{
 "cells": [
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "# Julia and the Power of Multiple Dispatch\n",
    "\n",
    "Julia is built around the concept of *multiple dispatch*. Multiple dispatch means that when you call a function \n",
    "\n",
    "```julia\n",
    "f(a, b, c)\n",
    "```\n",
    "\n",
    "Julia chooses *which implementation* of the function `f` to call based on the types of `a`, `b`, and `c`. Compare this with Python, in which\n",
    "\n",
    "```python\n",
    "# python\n",
    "f(a, b, c)\n",
    "```\n",
    "\n",
    "always calls the same function `f` for any `a`, `b`, and `c`,\n",
    "\n",
    "or\n",
    "\n",
    "```python\n",
    "# python\n",
    "a.f(b, c)\n",
    "```\n",
    "\n",
    "which chooses the version of `f` based on the class of `a`, but not `b` or `c`. \n",
    "\n",
    "This allows us to do some really cool things in Julia that would be difficult in other languages. As an example, let's show off by building a simple tool for automatic differentiation. \n",
    "\n",
    "By the way, if you want to use automatic differentiation in your own code, the excellent [ForwardDiff.jl](https://github.com/JuliaDiff/ForwardDiff.jl) package provides a complete implementation of the basic idea that we're showing off here. "
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "# Example: Automatic Differentiation\n",
    "\n",
    "A common problem in computing (especially in robotics) is:\n",
    "\n",
    "Given a function $f(x)$, find the function $df(x)$ which evaluates $\\frac{d f}{d x}$ at x. \n",
    "\n",
    "When $f(x)$ is a mathematical expression, this is straightforward: we just work out the derivative analytically and write it down. But what do we do when $f(x)$ is a function defined in code? \n",
    "\n",
    "We have a few options: \n",
    "\n",
    "### Analytic differentiation\n",
    "\n",
    "If we have access to the code of $f(x)$ or the math it was based on, we can work out its derivative by hand and then write code to implement that derivative. This works fine, but it's wasteful (we end up writing code to implement both $f$ and $df$) and error-prone (we have to make sure both pieces of code match...forever). \n",
    "\n",
    "### Numerical differentiation\n",
    "\n",
    "If we don't want to write out $df$ by hand, we can estimate the derivative at some input $x$ by perturbing that input slightly: \n",
    "\n",
    "$$\n",
    "\\left. \\frac{d f}{dx} \\right|_x \\approx \\frac{f(x + \\delta x) - f(x)}{\\delta x}\n",
    "$$\n",
    "\n",
    "Ideally, this gives us the exact answer as $\\delta x \\to 0$. Unfortunately, computers are not mathematically ideal. In particular, as $\\delta x$ shrinks, the error induced by floating-point rounding becomes more significant. On the other hand, as $\\delta x$ grows, our estimate of the derivative becomes less mathematically ideal. \n",
    "\n",
    "### Automatic differentiation\n",
    "\n",
    "Automatic differentiation (or autodiff) refers to a family of methods for computing exact derivatives, generally by running a special data type through your code. \n",
    "\n",
    "In forward-mode autodiff (the only kind we'll discuss here), we create a *dual* number, which stores both its value and its derivative. Then we implement basic mathematical operations on that dual number and let the chain rule take care of the rest. \n",
    "\n",
    "This is easier to see with an example. "
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "First, we'll create a structure to represent our dual numbers: "
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 1,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "Dual{Float64}(1.0, 0.0)"
      ]
     },
     "execution_count": 1,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "# The {T} annotation indicates that our `Dual` type is \n",
    "# parameterized (i.e. generic). This struct can hold \n",
    "# any pair of value and derivative, as long as both are\n",
    "# of the same type. \n",
    "\n",
    "struct Dual{T}\n",
    "    value::T\n",
    "    derivative::T\n",
    "end\n",
    "\n",
    "# For example, we can construct a `Dual` with Float64 entries:\n",
    "Dual(1.0, 0.0)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 2,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "Dual{Int64}(1, 0)"
      ]
     },
     "execution_count": 2,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "# or a Dual with integer entries:\n",
    "Dual(1, 0)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 3,
   "metadata": {},
   "outputs": [],
   "source": [
    "# and Julia will generate specialized code for every new kind of `Dual{T}` we use. "
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "Now let's implement addition. Julia already knows how to add numbers, we just have to teach it to also add Duals. First, we need to import the `+` function so that we can extend its behavior:"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 4,
   "metadata": {},
   "outputs": [],
   "source": [
    "import Base: +  # Base is the common library of tools and functions that ship with Julia"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "Functions in Julia can have lots of different methods that act on different input types. To see all the existing ways you can use a given function, use `methods()`: "
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 5,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/html": [
       "180 methods for generic function <b>+</b>:<ul><li> +(x::<b>Bool</b>, z::<b>Complex{Bool}</b>) at <a href=\"https://github.com/JuliaLang/julia/tree/d386e40c17d43b79fc89d3e579fc04547241787c/base/complex.jl#L232\" target=\"_blank\">complex.jl:232</a></li> <li> +(x::<b>Bool</b>, y::<b>Bool</b>) at <a href=\"https://github.com/JuliaLang/julia/tree/d386e40c17d43b79fc89d3e579fc04547241787c/base/bool.jl#L89\" target=\"_blank\">bool.jl:89</a></li> <li> +(x::<b>Bool</b>) at <a href=\"https://github.com/JuliaLang/julia/tree/d386e40c17d43b79fc89d3e579fc04547241787c/base/bool.jl#L86\" target=\"_blank\">bool.jl:86</a></li> <li> +<i>{T<:AbstractFloat}</i>(x::<b>Bool</b>, y::<b>T</b>) at <a href=\"https://github.com/JuliaLang/julia/tree/d386e40c17d43b79fc89d3e579fc04547241787c/base/bool.jl#L96\" target=\"_blank\">bool.jl:96</a></li> <li> +(x::<b>Bool</b>, z::<b>Complex</b>) at <a href=\"https://github.com/JuliaLang/julia/tree/d386e40c17d43b79fc89d3e579fc04547241787c/base/complex.jl#L239\" target=\"_blank\">complex.jl:239</a></li> <li> +(a::<b>Float16</b>, b::<b>Float16</b>) at <a href=\"https://github.com/JuliaLang/julia/tree/d386e40c17d43b79fc89d3e579fc04547241787c/base/float.jl#L372\" target=\"_blank\">float.jl:372</a></li> <li> +(x::<b>Float32</b>, y::<b>Float32</b>) at <a href=\"https://github.com/JuliaLang/julia/tree/d386e40c17d43b79fc89d3e579fc04547241787c/base/float.jl#L374\" target=\"_blank\">float.jl:374</a></li> <li> +(x::<b>Float64</b>, y::<b>Float64</b>) at <a href=\"https://github.com/JuliaLang/julia/tree/d386e40c17d43b79fc89d3e579fc04547241787c/base/float.jl#L375\" target=\"_blank\">float.jl:375</a></li> <li> +(z::<b>Complex{Bool}</b>, x::<b>Bool</b>) at <a href=\"https://github.com/JuliaLang/julia/tree/d386e40c17d43b79fc89d3e579fc04547241787c/base/complex.jl#L233\" target=\"_blank\">complex.jl:233</a></li> <li> +(z::<b>Complex{Bool}</b>, x::<b>Real</b>) at <a href=\"https://github.com/JuliaLang/julia/tree/d386e40c17d43b79fc89d3e579fc04547241787c/base/complex.jl#L247\" target=\"_blank\">complex.jl:247</a></li> <li> +(x::<b>Char</b>, y::<b>Integer</b>) at <a href=\"https://github.com/JuliaLang/julia/tree/d386e40c17d43b79fc89d3e579fc04547241787c/base/char.jl#L40\" target=\"_blank\">char.jl:40</a></li> <li> +(c::<b>BigInt</b>, x::<b>BigFloat</b>) at <a href=\"https://github.com/JuliaLang/julia/tree/d386e40c17d43b79fc89d3e579fc04547241787c/base/mpfr.jl#L312\" target=\"_blank\">mpfr.jl:312</a></li> <li> +(a::<b>BigInt</b>, b::<b>BigInt</b>, c::<b>BigInt</b>, d::<b>BigInt</b>, e::<b>BigInt</b>) at <a href=\"https://github.com/JuliaLang/julia/tree/d386e40c17d43b79fc89d3e579fc04547241787c/base/gmp.jl#L334\" target=\"_blank\">gmp.jl:334</a></li> <li> +(a::<b>BigInt</b>, b::<b>BigInt</b>, c::<b>BigInt</b>, d::<b>BigInt</b>) at <a href=\"https://github.com/JuliaLang/julia/tree/d386e40c17d43b79fc89d3e579fc04547241787c/base/gmp.jl#L327\" target=\"_blank\">gmp.jl:327</a></li> <li> +(a::<b>BigInt</b>, b::<b>BigInt</b>, c::<b>BigInt</b>) at <a href=\"https://github.com/JuliaLang/julia/tree/d386e40c17d43b79fc89d3e579fc04547241787c/base/gmp.jl#L321\" target=\"_blank\">gmp.jl:321</a></li> <li> +(x::<b>BigInt</b>, y::<b>BigInt</b>) at <a href=\"https://github.com/JuliaLang/julia/tree/d386e40c17d43b79fc89d3e579fc04547241787c/base/gmp.jl#L289\" target=\"_blank\">gmp.jl:289</a></li> <li> +(x::<b>BigInt</b>, c::<b>Union{UInt16, UInt32, UInt64, UInt8}</b>) at <a href=\"https://github.com/JuliaLang/julia/tree/d386e40c17d43b79fc89d3e579fc04547241787c/base/gmp.jl#L346\" target=\"_blank\">gmp.jl:346</a></li> <li> +(x::<b>BigInt</b>, c::<b>Union{Int16, Int32, Int64, Int8}</b>) at <a href=\"https://github.com/JuliaLang/julia/tree/d386e40c17d43b79fc89d3e579fc04547241787c/base/gmp.jl#L362\" target=\"_blank\">gmp.jl:362</a></li> <li> +(a::<b>BigFloat</b>, b::<b>BigFloat</b>, c::<b>BigFloat</b>, d::<b>BigFloat</b>, e::<b>BigFloat</b>) at <a href=\"https://github.com/JuliaLang/julia/tree/d386e40c17d43b79fc89d3e579fc04547241787c/base/mpfr.jl#L460\" target=\"_blank\">mpfr.jl:460</a></li> <li> +(a::<b>BigFloat</b>, b::<b>BigFloat</b>, c::<b>BigFloat</b>, d::<b>BigFloat</b>) at <a href=\"https://github.com/JuliaLang/julia/tree/d386e40c17d43b79fc89d3e579fc04547241787c/base/mpfr.jl#L453\" target=\"_blank\">mpfr.jl:453</a></li> <li> +(a::<b>BigFloat</b>, b::<b>BigFloat</b>, c::<b>BigFloat</b>) at <a href=\"https://github.com/JuliaLang/julia/tree/d386e40c17d43b79fc89d3e579fc04547241787c/base/mpfr.jl#L447\" target=\"_blank\">mpfr.jl:447</a></li> <li> +(x::<b>BigFloat</b>, c::<b>BigInt</b>) at <a href=\"https://github.com/JuliaLang/julia/tree/d386e40c17d43b79fc89d3e579fc04547241787c/base/mpfr.jl#L308\" target=\"_blank\">mpfr.jl:308</a></li> <li> +(x::<b>BigFloat</b>, y::<b>BigFloat</b>) at <a href=\"https://github.com/JuliaLang/julia/tree/d386e40c17d43b79fc89d3e579fc04547241787c/base/mpfr.jl#L277\" target=\"_blank\">mpfr.jl:277</a></li> <li> +(x::<b>BigFloat</b>, c::<b>Union{UInt16, UInt32, UInt64, UInt8}</b>) at <a href=\"https://github.com/JuliaLang/julia/tree/d386e40c17d43b79fc89d3e579fc04547241787c/base/mpfr.jl#L284\" target=\"_blank\">mpfr.jl:284</a></li> <li> +(x::<b>BigFloat</b>, c::<b>Union{Int16, Int32, Int64, Int8}</b>) at <a href=\"https://github.com/JuliaLang/julia/tree/d386e40c17d43b79fc89d3e579fc04547241787c/base/mpfr.jl#L292\" target=\"_blank\">mpfr.jl:292</a></li> <li> +(x::<b>BigFloat</b>, c::<b>Union{Float16, Float32, Float64}</b>) at <a href=\"https://github.com/JuliaLang/julia/tree/d386e40c17d43b79fc89d3e579fc04547241787c/base/mpfr.jl#L300\" target=\"_blank\">mpfr.jl:300</a></li> <li> +(B::<b>BitArray{2}</b>, J::<b>UniformScaling</b>) at <a href=\"https://github.com/JuliaLang/julia/tree/d386e40c17d43b79fc89d3e579fc04547241787c/base/linalg/uniformscaling.jl#L59\" target=\"_blank\">linalg/uniformscaling.jl:59</a></li> <li> +(a::<b>Base.Pkg.Resolve.VersionWeights.VWPreBuildItem</b>, b::<b>Base.Pkg.Resolve.VersionWeights.VWPreBuildItem</b>) at <a href=\"https://github.com/JuliaLang/julia/tree/d386e40c17d43b79fc89d3e579fc04547241787c/base/pkg/resolve/versionweight.jl#L87\" target=\"_blank\">pkg/resolve/versionweight.jl:87</a></li> <li> +(a::<b>Base.Pkg.Resolve.VersionWeights.VWPreBuild</b>, b::<b>Base.Pkg.Resolve.VersionWeights.VWPreBuild</b>) at <a href=\"https://github.com/JuliaLang/julia/tree/d386e40c17d43b79fc89d3e579fc04547241787c/base/pkg/resolve/versionweight.jl#L135\" target=\"_blank\">pkg/resolve/versionweight.jl:135</a></li> <li> +(a::<b>Base.Pkg.Resolve.VersionWeights.VersionWeight</b>, b::<b>Base.Pkg.Resolve.VersionWeights.VersionWeight</b>) at <a href=\"https://github.com/JuliaLang/julia/tree/d386e40c17d43b79fc89d3e579fc04547241787c/base/pkg/resolve/versionweight.jl#L197\" target=\"_blank\">pkg/resolve/versionweight.jl:197</a></li> <li> +(a::<b>Base.Pkg.Resolve.MaxSum.FieldValues.FieldValue</b>, b::<b>Base.Pkg.Resolve.MaxSum.FieldValues.FieldValue</b>) at <a href=\"https://github.com/JuliaLang/julia/tree/d386e40c17d43b79fc89d3e579fc04547241787c/base/pkg/resolve/fieldvalue.jl#L44\" target=\"_blank\">pkg/resolve/fieldvalue.jl:44</a></li> <li> +(x::<b>Base.Dates.CompoundPeriod</b>, y::<b>Base.Dates.CompoundPeriod</b>) at <a href=\"https://github.com/JuliaLang/julia/tree/d386e40c17d43b79fc89d3e579fc04547241787c/base/dates/periods.jl#L349\" target=\"_blank\">dates/periods.jl:349</a></li> <li> +(x::<b>Base.Dates.CompoundPeriod</b>, y::<b>Base.Dates.Period</b>) at <a href=\"https://github.com/JuliaLang/julia/tree/d386e40c17d43b79fc89d3e579fc04547241787c/base/dates/periods.jl#L347\" target=\"_blank\">dates/periods.jl:347</a></li> <li> +(x::<b>Base.Dates.CompoundPeriod</b>, y::<b>Base.Dates.TimeType</b>) at <a href=\"https://github.com/JuliaLang/julia/tree/d386e40c17d43b79fc89d3e579fc04547241787c/base/dates/periods.jl#L387\" target=\"_blank\">dates/periods.jl:387</a></li> <li> +(x::<b>Date</b>, y::<b>Base.Dates.Day</b>) at <a href=\"https://github.com/JuliaLang/julia/tree/d386e40c17d43b79fc89d3e579fc04547241787c/base/dates/arithmetic.jl#L77\" target=\"_blank\">dates/arithmetic.jl:77</a></li> <li> +(x::<b>Date</b>, y::<b>Base.Dates.Week</b>) at <a href=\"https://github.com/JuliaLang/julia/tree/d386e40c17d43b79fc89d3e579fc04547241787c/base/dates/arithmetic.jl#L75\" target=\"_blank\">dates/arithmetic.jl:75</a></li> <li> +(dt::<b>Date</b>, z::<b>Base.Dates.Month</b>) at <a href=\"https://github.com/JuliaLang/julia/tree/d386e40c17d43b79fc89d3e579fc04547241787c/base/dates/arithmetic.jl#L58\" target=\"_blank\">dates/arithmetic.jl:58</a></li> <li> +(dt::<b>Date</b>, y::<b>Base.Dates.Year</b>) at <a href=\"https://github.com/JuliaLang/julia/tree/d386e40c17d43b79fc89d3e579fc04547241787c/base/dates/arithmetic.jl#L32\" target=\"_blank\">dates/arithmetic.jl:32</a></li> <li> +(dt::<b>Date</b>, t::<b>Base.Dates.Time</b>) at <a href=\"https://github.com/JuliaLang/julia/tree/d386e40c17d43b79fc89d3e579fc04547241787c/base/dates/arithmetic.jl#L20\" target=\"_blank\">dates/arithmetic.jl:20</a></li> <li> +(t::<b>Base.Dates.Time</b>, dt::<b>Date</b>) at <a href=\"https://github.com/JuliaLang/julia/tree/d386e40c17d43b79fc89d3e579fc04547241787c/base/dates/arithmetic.jl#L24\" target=\"_blank\">dates/arithmetic.jl:24</a></li> <li> +(x::<b>Base.Dates.Time</b>, y::<b>Base.Dates.TimePeriod</b>) at <a href=\"https://github.com/JuliaLang/julia/tree/d386e40c17d43b79fc89d3e579fc04547241787c/base/dates/arithmetic.jl#L81\" target=\"_blank\">dates/arithmetic.jl:81</a></li> <li> +(dt::<b>DateTime</b>, z::<b>Base.Dates.Month</b>) at <a href=\"https://github.com/JuliaLang/julia/tree/d386e40c17d43b79fc89d3e579fc04547241787c/base/dates/arithmetic.jl#L52\" target=\"_blank\">dates/arithmetic.jl:52</a></li> <li> +(dt::<b>DateTime</b>, y::<b>Base.Dates.Year</b>) at <a href=\"https://github.com/JuliaLang/julia/tree/d386e40c17d43b79fc89d3e579fc04547241787c/base/dates/arithmetic.jl#L28\" target=\"_blank\">dates/arithmetic.jl:28</a></li> <li> +(x::<b>DateTime</b>, y::<b>Base.Dates.Period</b>) at <a href=\"https://github.com/JuliaLang/julia/tree/d386e40c17d43b79fc89d3e579fc04547241787c/base/dates/arithmetic.jl#L79\" target=\"_blank\">dates/arithmetic.jl:79</a></li> <li> +(y::<b>AbstractFloat</b>, x::<b>Bool</b>) at <a href=\"https://github.com/JuliaLang/julia/tree/d386e40c17d43b79fc89d3e579fc04547241787c/base/bool.jl#L98\" target=\"_blank\">bool.jl:98</a></li> <li> +<i>{T<:Union{Int128, Int16, Int32, Int64, Int8, UInt128, UInt16, UInt32, UInt64, UInt8}}</i>(x::<b>T</b>, y::<b>T</b>) at <a href=\"https://github.com/JuliaLang/julia/tree/d386e40c17d43b79fc89d3e579fc04547241787c/base/int.jl#L32\" target=\"_blank\">int.jl:32</a></li> <li> +(x::<b>Integer</b>, y::<b>Ptr</b>) at <a href=\"https://github.com/JuliaLang/julia/tree/d386e40c17d43b79fc89d3e579fc04547241787c/base/pointer.jl#L128\" target=\"_blank\">pointer.jl:128</a></li> <li> +(z::<b>Complex</b>, w::<b>Complex</b>) at <a href=\"https://github.com/JuliaLang/julia/tree/d386e40c17d43b79fc89d3e579fc04547241787c/base/complex.jl#L221\" target=\"_blank\">complex.jl:221</a></li> <li> +(z::<b>Complex</b>, x::<b>Bool</b>) at <a href=\"https://github.com/JuliaLang/julia/tree/d386e40c17d43b79fc89d3e579fc04547241787c/base/complex.jl#L240\" target=\"_blank\">complex.jl:240</a></li> <li> +(x::<b>Real</b>, z::<b>Complex{Bool}</b>) at <a href=\"https://github.com/JuliaLang/julia/tree/d386e40c17d43b79fc89d3e579fc04547241787c/base/complex.jl#L246\" target=\"_blank\">complex.jl:246</a></li> <li> +(x::<b>Real</b>, z::<b>Complex</b>) at <a href=\"https://github.com/JuliaLang/julia/tree/d386e40c17d43b79fc89d3e579fc04547241787c/base/complex.jl#L258\" target=\"_blank\">complex.jl:258</a></li> <li> +(z::<b>Complex</b>, x::<b>Real</b>) at <a href=\"https://github.com/JuliaLang/julia/tree/d386e40c17d43b79fc89d3e579fc04547241787c/base/complex.jl#L259\" target=\"_blank\">complex.jl:259</a></li> <li> +(x::<b>Rational</b>, y::<b>Rational</b>) at <a href=\"https://github.com/JuliaLang/julia/tree/d386e40c17d43b79fc89d3e579fc04547241787c/base/rational.jl#L245\" target=\"_blank\">rational.jl:245</a></li> <li> +(x::<b>Integer</b>, y::<b>Char</b>) at <a href=\"https://github.com/JuliaLang/julia/tree/d386e40c17d43b79fc89d3e579fc04547241787c/base/char.jl#L41\" target=\"_blank\">char.jl:41</a></li> <li> +(i::<b>Integer</b>, index::<b>CartesianIndex</b>) at <a href=\"https://github.com/JuliaLang/julia/tree/d386e40c17d43b79fc89d3e579fc04547241787c/base/multidimensional.jl#L110\" target=\"_blank\">multidimensional.jl:110</a></li> <li> +(c::<b>Union{UInt16, UInt32, UInt64, UInt8}</b>, x::<b>BigInt</b>) at <a href=\"https://github.com/JuliaLang/julia/tree/d386e40c17d43b79fc89d3e579fc04547241787c/base/gmp.jl#L350\" target=\"_blank\">gmp.jl:350</a></li> <li> +(c::<b>Union{Int16, Int32, Int64, Int8}</b>, x::<b>BigInt</b>) at <a href=\"https://github.com/JuliaLang/julia/tree/d386e40c17d43b79fc89d3e579fc04547241787c/base/gmp.jl#L363\" target=\"_blank\">gmp.jl:363</a></li> <li> +(c::<b>Union{UInt16, UInt32, UInt64, UInt8}</b>, x::<b>BigFloat</b>) at <a href=\"https://github.com/JuliaLang/julia/tree/d386e40c17d43b79fc89d3e579fc04547241787c/base/mpfr.jl#L288\" target=\"_blank\">mpfr.jl:288</a></li> <li> +(c::<b>Union{Int16, Int32, Int64, Int8}</b>, x::<b>BigFloat</b>) at <a href=\"https://github.com/JuliaLang/julia/tree/d386e40c17d43b79fc89d3e579fc04547241787c/base/mpfr.jl#L296\" target=\"_blank\">mpfr.jl:296</a></li> <li> +(c::<b>Union{Float16, Float32, Float64}</b>, x::<b>BigFloat</b>) at <a href=\"https://github.com/JuliaLang/julia/tree/d386e40c17d43b79fc89d3e579fc04547241787c/base/mpfr.jl#L304\" target=\"_blank\">mpfr.jl:304</a></li> <li> +(x::<b>Irrational</b>, y::<b>Irrational</b>) at <a href=\"https://github.com/JuliaLang/julia/tree/d386e40c17d43b79fc89d3e579fc04547241787c/base/irrationals.jl#L109\" target=\"_blank\">irrationals.jl:109</a></li> <li> +(x::<b>Real</b>, r::<b>Base.Use_StepRangeLen_Instead</b>) at <a href=\"https://github.com/JuliaLang/julia/tree/d386e40c17d43b79fc89d3e579fc04547241787c/base/deprecated.jl#L1232\" target=\"_blank\">deprecated.jl:1232</a></li> <li> +(x::<b>Number</b>) at <a href=\"https://github.com/JuliaLang/julia/tree/d386e40c17d43b79fc89d3e579fc04547241787c/base/operators.jl#L399\" target=\"_blank\">operators.jl:399</a></li> <li> +<i>{T<:Number}</i>(x::<b>T</b>, y::<b>T</b>) at <a href=\"https://github.com/JuliaLang/julia/tree/d386e40c17d43b79fc89d3e579fc04547241787c/base/promotion.jl#L335\" target=\"_blank\">promotion.jl:335</a></li> <li> +(x::<b>Number</b>, y::<b>Number</b>) at <a href=\"https://github.com/JuliaLang/julia/tree/d386e40c17d43b79fc89d3e579fc04547241787c/base/promotion.jl#L249\" target=\"_blank\">promotion.jl:249</a></li> <li> +(x::<b>Real</b>, r::<b>AbstractUnitRange</b>) at <a href=\"https://github.com/JuliaLang/julia/tree/d386e40c17d43b79fc89d3e579fc04547241787c/base/range.jl#L721\" target=\"_blank\">range.jl:721</a></li> <li> +(x::<b>Number</b>, r::<b>AbstractUnitRange</b>) at <a href=\"https://github.com/JuliaLang/julia/tree/d386e40c17d43b79fc89d3e579fc04547241787c/base/range.jl#L723\" target=\"_blank\">range.jl:723</a></li> <li> +(x::<b>Number</b>, r::<b>StepRangeLen</b>) at <a href=\"https://github.com/JuliaLang/julia/tree/d386e40c17d43b79fc89d3e579fc04547241787c/base/range.jl#L726\" target=\"_blank\">range.jl:726</a></li> <li> +(x::<b>Number</b>, r::<b>LinSpace</b>) at <a href=\"https://github.com/JuliaLang/julia/tree/d386e40c17d43b79fc89d3e579fc04547241787c/base/range.jl#L730\" target=\"_blank\">range.jl:730</a></li> <li> +(x::<b>Number</b>, r::<b>Range</b>) at <a href=\"https://github.com/JuliaLang/julia/tree/d386e40c17d43b79fc89d3e579fc04547241787c/base/range.jl#L724\" target=\"_blank\">range.jl:724</a></li> <li> +(r::<b>Range</b>, x::<b>Number</b>) at <a href=\"https://github.com/JuliaLang/julia/tree/d386e40c17d43b79fc89d3e579fc04547241787c/base/range.jl#L732\" target=\"_blank\">range.jl:732</a></li> <li> +(r1::<b>OrdinalRange</b>, r2::<b>OrdinalRange</b>) at <a href=\"https://github.com/JuliaLang/julia/tree/d386e40c17d43b79fc89d3e579fc04547241787c/base/range.jl#L882\" target=\"_blank\">range.jl:882</a></li> <li> +<i>{T}</i>(r1::<b>LinSpace{T}</b>, r2::<b>LinSpace{T}</b>) at <a href=\"https://github.com/JuliaLang/julia/tree/d386e40c17d43b79fc89d3e579fc04547241787c/base/range.jl#L889\" target=\"_blank\">range.jl:889</a></li> <li> +<i>{R<:Base.TwicePrecision, T}</i>(r1::<b>StepRangeLen{T,R,S} where S</b>, r2::<b>StepRangeLen{T,R,S} where S</b>) at <a href=\"https://github.com/JuliaLang/julia/tree/d386e40c17d43b79fc89d3e579fc04547241787c/base/twiceprecision.jl#L300\" target=\"_blank\">twiceprecision.jl:300</a></li> <li> +<i>{T, S}</i>(r1::<b>StepRangeLen{T,S,S} where S</b>, r2::<b>StepRangeLen{T,S,S} where S</b>) at <a href=\"https://github.com/JuliaLang/julia/tree/d386e40c17d43b79fc89d3e579fc04547241787c/base/range.jl#L905\" target=\"_blank\">range.jl:905</a></li> <li> +(r1::<b>Union{LinSpace, OrdinalRange, StepRangeLen}</b>, r2::<b>Union{LinSpace, OrdinalRange, StepRangeLen}</b>) at <a href=\"https://github.com/JuliaLang/julia/tree/d386e40c17d43b79fc89d3e579fc04547241787c/base/range.jl#L897\" target=\"_blank\">range.jl:897</a></li> <li> +(x::<b>Base.TwicePrecision</b>, y::<b>Number</b>) at <a href=\"https://github.com/JuliaLang/julia/tree/d386e40c17d43b79fc89d3e579fc04547241787c/base/twiceprecision.jl#L455\" target=\"_blank\">twiceprecision.jl:455</a></li> <li> +(x::<b>Number</b>, y::<b>Base.TwicePrecision</b>) at <a href=\"https://github.com/JuliaLang/julia/tree/d386e40c17d43b79fc89d3e579fc04547241787c/base/twiceprecision.jl#L458\" target=\"_blank\">twiceprecision.jl:458</a></li> <li> +<i>{T}</i>(x::<b>Base.TwicePrecision{T}</b>, y::<b>Base.TwicePrecision{T}</b>) at <a href=\"https://github.com/JuliaLang/julia/tree/d386e40c17d43b79fc89d3e579fc04547241787c/base/twiceprecision.jl#L461\" target=\"_blank\">twiceprecision.jl:461</a></li> <li> +(x::<b>Base.TwicePrecision</b>, y::<b>Base.TwicePrecision</b>) at <a href=\"https://github.com/JuliaLang/julia/tree/d386e40c17d43b79fc89d3e579fc04547241787c/base/twiceprecision.jl#L465\" target=\"_blank\">twiceprecision.jl:465</a></li> <li> +(x::<b>Ptr</b>, y::<b>Integer</b>) at <a href=\"https://github.com/JuliaLang/julia/tree/d386e40c17d43b79fc89d3e579fc04547241787c/base/pointer.jl#L126\" target=\"_blank\">pointer.jl:126</a></li> <li> +(A::<b>BitArray</b>, B::<b>BitArray</b>) at <a href=\"https://github.com/JuliaLang/julia/tree/d386e40c17d43b79fc89d3e579fc04547241787c/base/bitarray.jl#L1177\" target=\"_blank\">bitarray.jl:1177</a></li> <li> +(A::<b>SymTridiagonal</b>, B::<b>SymTridiagonal</b>) at <a href=\"https://github.com/JuliaLang/julia/tree/d386e40c17d43b79fc89d3e579fc04547241787c/base/linalg/tridiag.jl#L128\" target=\"_blank\">linalg/tridiag.jl:128</a></li> <li> +(A::<b>Tridiagonal</b>, B::<b>Tridiagonal</b>) at <a href=\"https://github.com/JuliaLang/julia/tree/d386e40c17d43b79fc89d3e579fc04547241787c/base/linalg/tridiag.jl#L624\" target=\"_blank\">linalg/tridiag.jl:624</a></li> <li> +(A::<b>UpperTriangular</b>, B::<b>UpperTriangular</b>) at <a href=\"https://github.com/JuliaLang/julia/tree/d386e40c17d43b79fc89d3e579fc04547241787c/base/linalg/triangular.jl#L419\" target=\"_blank\">linalg/triangular.jl:419</a></li> <li> +(A::<b>LowerTriangular</b>, B::<b>LowerTriangular</b>) at <a href=\"https://github.com/JuliaLang/julia/tree/d386e40c17d43b79fc89d3e579fc04547241787c/base/linalg/triangular.jl#L420\" target=\"_blank\">linalg/triangular.jl:420</a></li> <li> +(A::<b>UpperTriangular</b>, B::<b>Base.LinAlg.UnitUpperTriangular</b>) at <a href=\"https://github.com/JuliaLang/julia/tree/d386e40c17d43b79fc89d3e579fc04547241787c/base/linalg/triangular.jl#L421\" target=\"_blank\">linalg/triangular.jl:421</a></li> <li> +(A::<b>LowerTriangular</b>, B::<b>Base.LinAlg.UnitLowerTriangular</b>) at <a href=\"https://github.com/JuliaLang/julia/tree/d386e40c17d43b79fc89d3e579fc04547241787c/base/linalg/triangular.jl#L422\" target=\"_blank\">linalg/triangular.jl:422</a></li> <li> +(A::<b>Base.LinAlg.UnitUpperTriangular</b>, B::<b>UpperTriangular</b>) at <a href=\"https://github.com/JuliaLang/julia/tree/d386e40c17d43b79fc89d3e579fc04547241787c/base/linalg/triangular.jl#L423\" target=\"_blank\">linalg/triangular.jl:423</a></li> <li> +(A::<b>Base.LinAlg.UnitLowerTriangular</b>, B::<b>LowerTriangular</b>) at <a href=\"https://github.com/JuliaLang/julia/tree/d386e40c17d43b79fc89d3e579fc04547241787c/base/linalg/triangular.jl#L424\" target=\"_blank\">linalg/triangular.jl:424</a></li> <li> +(A::<b>Base.LinAlg.UnitUpperTriangular</b>, B::<b>Base.LinAlg.UnitUpperTriangular</b>) at <a href=\"https://github.com/JuliaLang/julia/tree/d386e40c17d43b79fc89d3e579fc04547241787c/base/linalg/triangular.jl#L425\" target=\"_blank\">linalg/triangular.jl:425</a></li> <li> +(A::<b>Base.LinAlg.UnitLowerTriangular</b>, B::<b>Base.LinAlg.UnitLowerTriangular</b>) at <a href=\"https://github.com/JuliaLang/julia/tree/d386e40c17d43b79fc89d3e579fc04547241787c/base/linalg/triangular.jl#L426\" target=\"_blank\">linalg/triangular.jl:426</a></li> <li> +(A::<b>Base.LinAlg.AbstractTriangular</b>, B::<b>Base.LinAlg.AbstractTriangular</b>) at <a href=\"https://github.com/JuliaLang/julia/tree/d386e40c17d43b79fc89d3e579fc04547241787c/base/linalg/triangular.jl#L427\" target=\"_blank\">linalg/triangular.jl:427</a></li> <li> +(A::<b>Symmetric</b>, x::<b>Bool</b>) at <a href=\"https://github.com/JuliaLang/julia/tree/d386e40c17d43b79fc89d3e579fc04547241787c/base/linalg/symmetric.jl#L274\" target=\"_blank\">linalg/symmetric.jl:274</a></li> <li> +(A::<b>Symmetric</b>, x::<b>Number</b>) at <a href=\"https://github.com/JuliaLang/julia/tree/d386e40c17d43b79fc89d3e579fc04547241787c/base/linalg/symmetric.jl#L276\" target=\"_blank\">linalg/symmetric.jl:276</a></li> <li> +(A::<b>Hermitian</b>, x::<b>Bool</b>) at <a href=\"https://github.com/JuliaLang/julia/tree/d386e40c17d43b79fc89d3e579fc04547241787c/base/linalg/symmetric.jl#L274\" target=\"_blank\">linalg/symmetric.jl:274</a></li> <li> +(A::<b>Hermitian</b>, x::<b>Real</b>) at <a href=\"https://github.com/JuliaLang/julia/tree/d386e40c17d43b79fc89d3e579fc04547241787c/base/linalg/symmetric.jl#L276\" target=\"_blank\">linalg/symmetric.jl:276</a></li> <li> +(Da::<b>Diagonal</b>, Db::<b>Diagonal</b>) at <a href=\"https://github.com/JuliaLang/julia/tree/d386e40c17d43b79fc89d3e579fc04547241787c/base/linalg/diagonal.jl#L140\" target=\"_blank\">linalg/diagonal.jl:140</a></li> <li> +(A::<b>Bidiagonal</b>, B::<b>Bidiagonal</b>) at <a href=\"https://github.com/JuliaLang/julia/tree/d386e40c17d43b79fc89d3e579fc04547241787c/base/linalg/bidiag.jl#L330\" target=\"_blank\">linalg/bidiag.jl:330</a></li> <li> +(UL::<b>UpperTriangular</b>, J::<b>UniformScaling</b>) at <a href=\"https://github.com/JuliaLang/julia/tree/d386e40c17d43b79fc89d3e579fc04547241787c/base/linalg/uniformscaling.jl#L72\" target=\"_blank\">linalg/uniformscaling.jl:72</a></li> <li> +(UL::<b>Base.LinAlg.UnitUpperTriangular</b>, J::<b>UniformScaling</b>) at <a href=\"https://github.com/JuliaLang/julia/tree/d386e40c17d43b79fc89d3e579fc04547241787c/base/linalg/uniformscaling.jl#L75\" target=\"_blank\">linalg/uniformscaling.jl:75</a></li> <li> +(UL::<b>LowerTriangular</b>, J::<b>UniformScaling</b>) at <a href=\"https://github.com/JuliaLang/julia/tree/d386e40c17d43b79fc89d3e579fc04547241787c/base/linalg/uniformscaling.jl#L72\" target=\"_blank\">linalg/uniformscaling.jl:72</a></li> <li> +(UL::<b>Base.LinAlg.UnitLowerTriangular</b>, J::<b>UniformScaling</b>) at <a href=\"https://github.com/JuliaLang/julia/tree/d386e40c17d43b79fc89d3e579fc04547241787c/base/linalg/uniformscaling.jl#L75\" target=\"_blank\">linalg/uniformscaling.jl:75</a></li> <li> +(A::<b>Array</b>, B::<b>SparseMatrixCSC</b>) at <a href=\"https://github.com/JuliaLang/julia/tree/d386e40c17d43b79fc89d3e579fc04547241787c/base/sparse/sparsematrix.jl#L1541\" target=\"_blank\">sparse/sparsematrix.jl:1541</a></li> <li> +(x::<b>Union{Base.ReshapedArray{T,1,A,MI} where MI<:Tuple{Vararg{Base.MultiplicativeInverses.SignedMultiplicativeInverse{Int64},N} where N} where A<:Union{DenseArray, SubArray{T,N,P,I,true} where I<:Tuple{Union{Base.Slice, UnitRange},Vararg{Any,N} where N} where P where N where T}, DenseArray{T,1}, SubArray{T,1,A,I,L} where L} where I<:Tuple{Vararg{Union{Base.AbstractCartesianIndex, Int64, Range{Int64}},N} where N} where A<:Union{Base.ReshapedArray{T,N,A,MI} where MI<:Tuple{Vararg{Base.MultiplicativeInverses.SignedMultiplicativeInverse{Int64},N} where N} where A<:Union{DenseArray, SubArray{T,N,P,I,true} where I<:Tuple{Union{Base.Slice, UnitRange},Vararg{Any,N} where N} where P where N where T} where N where T, DenseArray} where T</b>, y::<b>AbstractSparseArray{Tv,Ti,1} where Ti where Tv</b>) at <a href=\"https://github.com/JuliaLang/julia/tree/d386e40c17d43b79fc89d3e579fc04547241787c/base/sparse/sparsevector.jl#L1340\" target=\"_blank\">sparse/sparsevector.jl:1340</a></li> <li> +(x::<b>Union{Base.ReshapedArray{#s268,N,A,MI} where MI<:Tuple{Vararg{Base.MultiplicativeInverses.SignedMultiplicativeInverse{Int64},N} where N} where A<:Union{DenseArray, SubArray{T,N,P,I,true} where I<:Tuple{Union{Base.Slice, UnitRange},Vararg{Any,N} where N} where P where N where T}, DenseArray{#s268,N}, SubArray{#s268,N,A,I,L} where L} where I<:Tuple{Vararg{Union{Base.AbstractCartesianIndex, Int64, Range{Int64}},N} where N} where A<:Union{Base.ReshapedArray{T,N,A,MI} where MI<:Tuple{Vararg{Base.MultiplicativeInverses.SignedMultiplicativeInverse{Int64},N} where N} where A<:Union{DenseArray, SubArray{T,N,P,I,true} where I<:Tuple{Union{Base.Slice, UnitRange},Vararg{Any,N} where N} where P where N where T} where N where T, DenseArray} where N where #s268<:Union{Base.Dates.CompoundPeriod, Base.Dates.Period}</b>) at <a href=\"https://github.com/JuliaLang/julia/tree/d386e40c17d43b79fc89d3e579fc04547241787c/base/dates/periods.jl#L358\" target=\"_blank\">dates/periods.jl:358</a></li> <li> +(A::<b>SparseMatrixCSC</b>, J::<b>UniformScaling</b>) at <a href=\"https://github.com/JuliaLang/julia/tree/d386e40c17d43b79fc89d3e579fc04547241787c/base/sparse/sparsematrix.jl#L3608\" target=\"_blank\">sparse/sparsematrix.jl:3608</a></li> <li> +<i>{TA, TJ}</i>(A::<b>AbstractArray{TA,2}</b>, J::<b>UniformScaling{TJ}</b>) at <a href=\"https://github.com/JuliaLang/julia/tree/d386e40c17d43b79fc89d3e579fc04547241787c/base/linalg/uniformscaling.jl#L119\" target=\"_blank\">linalg/uniformscaling.jl:119</a></li> <li> +(A::<b>Diagonal</b>, B::<b>Bidiagonal</b>) at <a href=\"https://github.com/JuliaLang/julia/tree/d386e40c17d43b79fc89d3e579fc04547241787c/base/linalg/special.jl#L113\" target=\"_blank\">linalg/special.jl:113</a></li> <li> +(A::<b>Bidiagonal</b>, B::<b>Diagonal</b>) at <a href=\"https://github.com/JuliaLang/julia/tree/d386e40c17d43b79fc89d3e579fc04547241787c/base/linalg/special.jl#L114\" target=\"_blank\">linalg/special.jl:114</a></li> <li> +(A::<b>Diagonal</b>, B::<b>Tridiagonal</b>) at <a href=\"https://github.com/JuliaLang/julia/tree/d386e40c17d43b79fc89d3e579fc04547241787c/base/linalg/special.jl#L113\" target=\"_blank\">linalg/special.jl:113</a></li> <li> +(A::<b>Tridiagonal</b>, B::<b>Diagonal</b>) at <a href=\"https://github.com/JuliaLang/julia/tree/d386e40c17d43b79fc89d3e579fc04547241787c/base/linalg/special.jl#L114\" target=\"_blank\">linalg/special.jl:114</a></li> <li> +(A::<b>Diagonal</b>, B::<b>Array{T,2} where T</b>) at <a href=\"https://github.com/JuliaLang/julia/tree/d386e40c17d43b79fc89d3e579fc04547241787c/base/linalg/special.jl#L113\" target=\"_blank\">linalg/special.jl:113</a></li> <li> +(A::<b>Array{T,2} where T</b>, B::<b>Diagonal</b>) at <a href=\"https://github.com/JuliaLang/julia/tree/d386e40c17d43b79fc89d3e579fc04547241787c/base/linalg/special.jl#L114\" target=\"_blank\">linalg/special.jl:114</a></li> <li> +(A::<b>Bidiagonal</b>, B::<b>Tridiagonal</b>) at <a href=\"https://github.com/JuliaLang/julia/tree/d386e40c17d43b79fc89d3e579fc04547241787c/base/linalg/special.jl#L113\" target=\"_blank\">linalg/special.jl:113</a></li> <li> +(A::<b>Tridiagonal</b>, B::<b>Bidiagonal</b>) at <a href=\"https://github.com/JuliaLang/julia/tree/d386e40c17d43b79fc89d3e579fc04547241787c/base/linalg/special.jl#L114\" target=\"_blank\">linalg/special.jl:114</a></li> <li> +(A::<b>Bidiagonal</b>, B::<b>Array{T,2} where T</b>) at <a href=\"https://github.com/JuliaLang/julia/tree/d386e40c17d43b79fc89d3e579fc04547241787c/base/linalg/special.jl#L113\" target=\"_blank\">linalg/special.jl:113</a></li> <li> +(A::<b>Array{T,2} where T</b>, B::<b>Bidiagonal</b>) at <a href=\"https://github.com/JuliaLang/julia/tree/d386e40c17d43b79fc89d3e579fc04547241787c/base/linalg/special.jl#L114\" target=\"_blank\">linalg/special.jl:114</a></li> <li> +(A::<b>Tridiagonal</b>, B::<b>Array{T,2} where T</b>) at <a href=\"https://github.com/JuliaLang/julia/tree/d386e40c17d43b79fc89d3e579fc04547241787c/base/linalg/special.jl#L113\" target=\"_blank\">linalg/special.jl:113</a></li> <li> +(A::<b>Array{T,2} where T</b>, B::<b>Tridiagonal</b>) at <a href=\"https://github.com/JuliaLang/julia/tree/d386e40c17d43b79fc89d3e579fc04547241787c/base/linalg/special.jl#L114\" target=\"_blank\">linalg/special.jl:114</a></li> <li> +(A::<b>SymTridiagonal</b>, B::<b>Tridiagonal</b>) at <a href=\"https://github.com/JuliaLang/julia/tree/d386e40c17d43b79fc89d3e579fc04547241787c/base/linalg/special.jl#L122\" target=\"_blank\">linalg/special.jl:122</a></li> <li> +(A::<b>Tridiagonal</b>, B::<b>SymTridiagonal</b>) at <a href=\"https://github.com/JuliaLang/julia/tree/d386e40c17d43b79fc89d3e579fc04547241787c/base/linalg/special.jl#L123\" target=\"_blank\">linalg/special.jl:123</a></li> <li> +(A::<b>SymTridiagonal</b>, B::<b>Array{T,2} where T</b>) at <a href=\"https://github.com/JuliaLang/julia/tree/d386e40c17d43b79fc89d3e579fc04547241787c/base/linalg/special.jl#L122\" target=\"_blank\">linalg/special.jl:122</a></li> <li> +(A::<b>Array{T,2} where T</b>, B::<b>SymTridiagonal</b>) at <a href=\"https://github.com/JuliaLang/julia/tree/d386e40c17d43b79fc89d3e579fc04547241787c/base/linalg/special.jl#L123\" target=\"_blank\">linalg/special.jl:123</a></li> <li> +(A::<b>Diagonal</b>, B::<b>SymTridiagonal</b>) at <a href=\"https://github.com/JuliaLang/julia/tree/d386e40c17d43b79fc89d3e579fc04547241787c/base/linalg/special.jl#L131\" target=\"_blank\">linalg/special.jl:131</a></li> <li> +(A::<b>SymTridiagonal</b>, B::<b>Diagonal</b>) at <a href=\"https://github.com/JuliaLang/julia/tree/d386e40c17d43b79fc89d3e579fc04547241787c/base/linalg/special.jl#L132\" target=\"_blank\">linalg/special.jl:132</a></li> <li> +(A::<b>Bidiagonal</b>, B::<b>SymTridiagonal</b>) at <a href=\"https://github.com/JuliaLang/julia/tree/d386e40c17d43b79fc89d3e579fc04547241787c/base/linalg/special.jl#L131\" target=\"_blank\">linalg/special.jl:131</a></li> <li> +(A::<b>SymTridiagonal</b>, B::<b>Bidiagonal</b>) at <a href=\"https://github.com/JuliaLang/julia/tree/d386e40c17d43b79fc89d3e579fc04547241787c/base/linalg/special.jl#L132\" target=\"_blank\">linalg/special.jl:132</a></li> <li> +(A::<b>Diagonal</b>, B::<b>UpperTriangular</b>) at <a href=\"https://github.com/JuliaLang/julia/tree/d386e40c17d43b79fc89d3e579fc04547241787c/base/linalg/special.jl#L143\" target=\"_blank\">linalg/special.jl:143</a></li> <li> +(A::<b>UpperTriangular</b>, B::<b>Diagonal</b>) at <a href=\"https://github.com/JuliaLang/julia/tree/d386e40c17d43b79fc89d3e579fc04547241787c/base/linalg/special.jl#L144\" target=\"_blank\">linalg/special.jl:144</a></li> <li> +(A::<b>Diagonal</b>, B::<b>Base.LinAlg.UnitUpperTriangular</b>) at <a href=\"https://github.com/JuliaLang/julia/tree/d386e40c17d43b79fc89d3e579fc04547241787c/base/linalg/special.jl#L143\" target=\"_blank\">linalg/special.jl:143</a></li> <li> +(A::<b>Base.LinAlg.UnitUpperTriangular</b>, B::<b>Diagonal</b>) at <a href=\"https://github.com/JuliaLang/julia/tree/d386e40c17d43b79fc89d3e579fc04547241787c/base/linalg/special.jl#L144\" target=\"_blank\">linalg/special.jl:144</a></li> <li> +(A::<b>Diagonal</b>, B::<b>LowerTriangular</b>) at <a href=\"https://github.com/JuliaLang/julia/tree/d386e40c17d43b79fc89d3e579fc04547241787c/base/linalg/special.jl#L143\" target=\"_blank\">linalg/special.jl:143</a></li> <li> +(A::<b>LowerTriangular</b>, B::<b>Diagonal</b>) at <a href=\"https://github.com/JuliaLang/julia/tree/d386e40c17d43b79fc89d3e579fc04547241787c/base/linalg/special.jl#L144\" target=\"_blank\">linalg/special.jl:144</a></li> <li> +(A::<b>Diagonal</b>, B::<b>Base.LinAlg.UnitLowerTriangular</b>) at <a href=\"https://github.com/JuliaLang/julia/tree/d386e40c17d43b79fc89d3e579fc04547241787c/base/linalg/special.jl#L143\" target=\"_blank\">linalg/special.jl:143</a></li> <li> +(A::<b>Base.LinAlg.UnitLowerTriangular</b>, B::<b>Diagonal</b>) at <a href=\"https://github.com/JuliaLang/julia/tree/d386e40c17d43b79fc89d3e579fc04547241787c/base/linalg/special.jl#L144\" target=\"_blank\">linalg/special.jl:144</a></li> <li> +(A::<b>Base.LinAlg.AbstractTriangular</b>, B::<b>SymTridiagonal</b>) at <a href=\"https://github.com/JuliaLang/julia/tree/d386e40c17d43b79fc89d3e579fc04547241787c/base/linalg/special.jl#L150\" target=\"_blank\">linalg/special.jl:150</a></li> <li> +(A::<b>SymTridiagonal</b>, B::<b>Base.LinAlg.AbstractTriangular</b>) at <a href=\"https://github.com/JuliaLang/julia/tree/d386e40c17d43b79fc89d3e579fc04547241787c/base/linalg/special.jl#L151\" target=\"_blank\">linalg/special.jl:151</a></li> <li> +(A::<b>Base.LinAlg.AbstractTriangular</b>, B::<b>Tridiagonal</b>) at <a href=\"https://github.com/JuliaLang/julia/tree/d386e40c17d43b79fc89d3e579fc04547241787c/base/linalg/special.jl#L150\" target=\"_blank\">linalg/special.jl:150</a></li> <li> +(A::<b>Tridiagonal</b>, B::<b>Base.LinAlg.AbstractTriangular</b>) at <a href=\"https://github.com/JuliaLang/julia/tree/d386e40c17d43b79fc89d3e579fc04547241787c/base/linalg/special.jl#L151\" target=\"_blank\">linalg/special.jl:151</a></li> <li> +(A::<b>Base.LinAlg.AbstractTriangular</b>, B::<b>Bidiagonal</b>) at <a href=\"https://github.com/JuliaLang/julia/tree/d386e40c17d43b79fc89d3e579fc04547241787c/base/linalg/special.jl#L150\" target=\"_blank\">linalg/special.jl:150</a></li> <li> +(A::<b>Bidiagonal</b>, B::<b>Base.LinAlg.AbstractTriangular</b>) at <a href=\"https://github.com/JuliaLang/julia/tree/d386e40c17d43b79fc89d3e579fc04547241787c/base/linalg/special.jl#L151\" target=\"_blank\">linalg/special.jl:151</a></li> <li> +(A::<b>Base.LinAlg.AbstractTriangular</b>, B::<b>Array{T,2} where T</b>) at <a href=\"https://github.com/JuliaLang/julia/tree/d386e40c17d43b79fc89d3e579fc04547241787c/base/linalg/special.jl#L150\" target=\"_blank\">linalg/special.jl:150</a></li> <li> +(A::<b>Array{T,2} where T</b>, B::<b>Base.LinAlg.AbstractTriangular</b>) at <a href=\"https://github.com/JuliaLang/julia/tree/d386e40c17d43b79fc89d3e579fc04547241787c/base/linalg/special.jl#L151\" target=\"_blank\">linalg/special.jl:151</a></li> <li> +(Y::<b>Union{Base.ReshapedArray{#s267,N,A,MI} where MI<:Tuple{Vararg{Base.MultiplicativeInverses.SignedMultiplicativeInverse{Int64},N} where N} where A<:Union{DenseArray, SubArray{T,N,P,I,true} where I<:Tuple{Union{Base.Slice, UnitRange},Vararg{Any,N} where N} where P where N where T}, DenseArray{#s267,N}, SubArray{#s267,N,A,I,L} where L} where I<:Tuple{Vararg{Union{Base.AbstractCartesianIndex, Int64, Range{Int64}},N} where N} where A<:Union{Base.ReshapedArray{T,N,A,MI} where MI<:Tuple{Vararg{Base.MultiplicativeInverses.SignedMultiplicativeInverse{Int64},N} where N} where A<:Union{DenseArray, SubArray{T,N,P,I,true} where I<:Tuple{Union{Base.Slice, UnitRange},Vararg{Any,N} where N} where P where N where T} where N where T, DenseArray} where N where #s267<:Union{Base.Dates.CompoundPeriod, Base.Dates.Period}</b>, x::<b>Union{Base.Dates.CompoundPeriod, Base.Dates.Period}</b>) at <a href=\"https://github.com/JuliaLang/julia/tree/d386e40c17d43b79fc89d3e579fc04547241787c/base/dates/periods.jl#L363\" target=\"_blank\">dates/periods.jl:363</a></li> <li> +(X::<b>Union{Base.ReshapedArray{#s266,N,A,MI} where MI<:Tuple{Vararg{Base.MultiplicativeInverses.SignedMultiplicativeInverse{Int64},N} where N} where A<:Union{DenseArray, SubArray{T,N,P,I,true} where I<:Tuple{Union{Base.Slice, UnitRange},Vararg{Any,N} where N} where P where N where T}, DenseArray{#s266,N}, SubArray{#s266,N,A,I,L} where L} where I<:Tuple{Vararg{Union{Base.AbstractCartesianIndex, Int64, Range{Int64}},N} where N} where A<:Union{Base.ReshapedArray{T,N,A,MI} where MI<:Tuple{Vararg{Base.MultiplicativeInverses.SignedMultiplicativeInverse{Int64},N} where N} where A<:Union{DenseArray, SubArray{T,N,P,I,true} where I<:Tuple{Union{Base.Slice, UnitRange},Vararg{Any,N} where N} where P where N where T} where N where T, DenseArray} where N where #s266<:Union{Base.Dates.CompoundPeriod, Base.Dates.Period}</b>, Y::<b>Union{Base.ReshapedArray{#s265,N,A,MI} where MI<:Tuple{Vararg{Base.MultiplicativeInverses.SignedMultiplicativeInverse{Int64},N} where N} where A<:Union{DenseArray, SubArray{T,N,P,I,true} where I<:Tuple{Union{Base.Slice, UnitRange},Vararg{Any,N} where N} where P where N where T}, DenseArray{#s265,N}, SubArray{#s265,N,A,I,L} where L} where I<:Tuple{Vararg{Union{Base.AbstractCartesianIndex, Int64, Range{Int64}},N} where N} where A<:Union{Base.ReshapedArray{T,N,A,MI} where MI<:Tuple{Vararg{Base.MultiplicativeInverses.SignedMultiplicativeInverse{Int64},N} where N} where A<:Union{DenseArray, SubArray{T,N,P,I,true} where I<:Tuple{Union{Base.Slice, UnitRange},Vararg{Any,N} where N} where P where N where T} where N where T, DenseArray} where N where #s265<:Union{Base.Dates.CompoundPeriod, Base.Dates.Period}</b>) at <a href=\"https://github.com/JuliaLang/julia/tree/d386e40c17d43b79fc89d3e579fc04547241787c/base/dates/periods.jl#L364\" target=\"_blank\">dates/periods.jl:364</a></li> <li> +(x::<b>Union{Base.ReshapedArray{#s268,N,A,MI} where MI<:Tuple{Vararg{Base.MultiplicativeInverses.SignedMultiplicativeInverse{Int64},N} where N} where A<:Union{DenseArray, SubArray{T,N,P,I,true} where I<:Tuple{Union{Base.Slice, UnitRange},Vararg{Any,N} where N} where P where N where T}, DenseArray{#s268,N}, SubArray{#s268,N,A,I,L} where L} where I<:Tuple{Vararg{Union{Base.AbstractCartesianIndex, Int64, Range{Int64}},N} where N} where A<:Union{Base.ReshapedArray{T,N,A,MI} where MI<:Tuple{Vararg{Base.MultiplicativeInverses.SignedMultiplicativeInverse{Int64},N} where N} where A<:Union{DenseArray, SubArray{T,N,P,I,true} where I<:Tuple{Union{Base.Slice, UnitRange},Vararg{Any,N} where N} where P where N where T} where N where T, DenseArray} where N where #s268<:Union{Base.Dates.CompoundPeriod, Base.Dates.Period}</b>, y::<b>Base.Dates.TimeType</b>) at <a href=\"https://github.com/JuliaLang/julia/tree/d386e40c17d43b79fc89d3e579fc04547241787c/base/dates/arithmetic.jl#L86\" target=\"_blank\">dates/arithmetic.jl:86</a></li> <li> +(r::<b>Range{#s268} where #s268<:Base.Dates.TimeType</b>, x::<b>Base.Dates.Period</b>) at <a href=\"https://github.com/JuliaLang/julia/tree/d386e40c17d43b79fc89d3e579fc04547241787c/base/dates/ranges.jl#L47\" target=\"_blank\">dates/ranges.jl:47</a></li> <li> +(A::<b>SparseMatrixCSC</b>, B::<b>SparseMatrixCSC</b>) at <a href=\"https://github.com/JuliaLang/julia/tree/d386e40c17d43b79fc89d3e579fc04547241787c/base/sparse/sparsematrix.jl#L1537\" target=\"_blank\">sparse/sparsematrix.jl:1537</a></li> <li> +(A::<b>SparseMatrixCSC</b>, B::<b>Array</b>) at <a href=\"https://github.com/JuliaLang/julia/tree/d386e40c17d43b79fc89d3e579fc04547241787c/base/sparse/sparsematrix.jl#L1540\" target=\"_blank\">sparse/sparsematrix.jl:1540</a></li> <li> +(x::<b>AbstractSparseArray{Tv,Ti,1} where Ti where Tv</b>, y::<b>AbstractSparseArray{Tv,Ti,1} where Ti where Tv</b>) at <a href=\"https://github.com/JuliaLang/julia/tree/d386e40c17d43b79fc89d3e579fc04547241787c/base/sparse/sparsevector.jl#L1339\" target=\"_blank\">sparse/sparsevector.jl:1339</a></li> <li> +(x::<b>AbstractSparseArray{Tv,Ti,1} where Ti where Tv</b>, y::<b>Union{Base.ReshapedArray{T,1,A,MI} where MI<:Tuple{Vararg{Base.MultiplicativeInverses.SignedMultiplicativeInverse{Int64},N} where N} where A<:Union{DenseArray, SubArray{T,N,P,I,true} where I<:Tuple{Union{Base.Slice, UnitRange},Vararg{Any,N} where N} where P where N where T}, DenseArray{T,1}, SubArray{T,1,A,I,L} where L} where I<:Tuple{Vararg{Union{Base.AbstractCartesianIndex, Int64, Range{Int64}},N} where N} where A<:Union{Base.ReshapedArray{T,N,A,MI} where MI<:Tuple{Vararg{Base.MultiplicativeInverses.SignedMultiplicativeInverse{Int64},N} where N} where A<:Union{DenseArray, SubArray{T,N,P,I,true} where I<:Tuple{Union{Base.Slice, UnitRange},Vararg{Any,N} where N} where P where N where T} where N where T, DenseArray} where T</b>) at <a href=\"https://github.com/JuliaLang/julia/tree/d386e40c17d43b79fc89d3e579fc04547241787c/base/sparse/sparsevector.jl#L1341\" target=\"_blank\">sparse/sparsevector.jl:1341</a></li> <li> +(x::<b>AbstractArray{#s45,N} where N where #s45<:Number</b>) at <a href=\"https://github.com/JuliaLang/julia/tree/d386e40c17d43b79fc89d3e579fc04547241787c/base/abstractarraymath.jl#L95\" target=\"_blank\">abstractarraymath.jl:95</a></li> <li> +(A::<b>AbstractArray</b>, B::<b>AbstractArray</b>) at <a href=\"https://github.com/JuliaLang/julia/tree/d386e40c17d43b79fc89d3e579fc04547241787c/base/arraymath.jl#L38\" target=\"_blank\">arraymath.jl:38</a></li> <li> +(A::<b>Number</b>, B::<b>AbstractArray</b>) at <a href=\"https://github.com/JuliaLang/julia/tree/d386e40c17d43b79fc89d3e579fc04547241787c/base/arraymath.jl#L45\" target=\"_blank\">arraymath.jl:45</a></li> <li> +(A::<b>AbstractArray</b>, B::<b>Number</b>) at <a href=\"https://github.com/JuliaLang/julia/tree/d386e40c17d43b79fc89d3e579fc04547241787c/base/arraymath.jl#L48\" target=\"_blank\">arraymath.jl:48</a></li> <li> +<i>{N}</i>(index1::<b>CartesianIndex{N}</b>, index2::<b>CartesianIndex{N}</b>) at <a href=\"https://github.com/JuliaLang/julia/tree/d386e40c17d43b79fc89d3e579fc04547241787c/base/multidimensional.jl#L101\" target=\"_blank\">multidimensional.jl:101</a></li> <li> +<i>{N}</i>(index::<b>CartesianIndex{N}</b>, i::<b>Integer</b>) at <a href=\"https://github.com/JuliaLang/julia/tree/d386e40c17d43b79fc89d3e579fc04547241787c/base/multidimensional.jl#L111\" target=\"_blank\">multidimensional.jl:111</a></li> <li> +(J1::<b>UniformScaling</b>, J2::<b>UniformScaling</b>) at <a href=\"https://github.com/JuliaLang/julia/tree/d386e40c17d43b79fc89d3e579fc04547241787c/base/linalg/uniformscaling.jl#L58\" target=\"_blank\">linalg/uniformscaling.jl:58</a></li> <li> +(J::<b>UniformScaling</b>, B::<b>BitArray{2}</b>) at <a href=\"https://github.com/JuliaLang/julia/tree/d386e40c17d43b79fc89d3e579fc04547241787c/base/linalg/uniformscaling.jl#L60\" target=\"_blank\">linalg/uniformscaling.jl:60</a></li> <li> +(J::<b>UniformScaling</b>, A::<b>AbstractArray{T,2} where T</b>) at <a href=\"https://github.com/JuliaLang/julia/tree/d386e40c17d43b79fc89d3e579fc04547241787c/base/linalg/uniformscaling.jl#L61\" target=\"_blank\">linalg/uniformscaling.jl:61</a></li> <li> +<i>{T}</i>(a::<b>Base.Pkg.Resolve.VersionWeights.HierarchicalValue{T}</b>, b::<b>Base.Pkg.Resolve.VersionWeights.HierarchicalValue{T}</b>) at <a href=\"https://github.com/JuliaLang/julia/tree/d386e40c17d43b79fc89d3e579fc04547241787c/base/pkg/resolve/versionweight.jl#L23\" target=\"_blank\">pkg/resolve/versionweight.jl:23</a></li> <li> +<i>{P<:Base.Dates.Period}</i>(x::<b>P</b>, y::<b>P</b>) at <a href=\"https://github.com/JuliaLang/julia/tree/d386e40c17d43b79fc89d3e579fc04547241787c/base/dates/periods.jl#L70\" target=\"_blank\">dates/periods.jl:70</a></li> <li> +(x::<b>Base.Dates.Period</b>, y::<b>Base.Dates.Period</b>) at <a href=\"https://github.com/JuliaLang/julia/tree/d386e40c17d43b79fc89d3e579fc04547241787c/base/dates/periods.jl#L346\" target=\"_blank\">dates/periods.jl:346</a></li> <li> +(y::<b>Base.Dates.Period</b>, x::<b>Base.Dates.CompoundPeriod</b>) at <a href=\"https://github.com/JuliaLang/julia/tree/d386e40c17d43b79fc89d3e579fc04547241787c/base/dates/periods.jl#L348\" target=\"_blank\">dates/periods.jl:348</a></li> <li> +(x::<b>Union{Base.Dates.CompoundPeriod, Base.Dates.Period}</b>) at <a href=\"https://github.com/JuliaLang/julia/tree/d386e40c17d43b79fc89d3e579fc04547241787c/base/dates/periods.jl#L357\" target=\"_blank\">dates/periods.jl:357</a></li> <li> +(x::<b>Union{Base.Dates.CompoundPeriod, Base.Dates.Period}</b>, Y::<b>Union{Base.ReshapedArray{#s268,N,A,MI} where MI<:Tuple{Vararg{Base.MultiplicativeInverses.SignedMultiplicativeInverse{Int64},N} where N} where A<:Union{DenseArray, SubArray{T,N,P,I,true} where I<:Tuple{Union{Base.Slice, UnitRange},Vararg{Any,N} where N} where P where N where T}, DenseArray{#s268,N}, SubArray{#s268,N,A,I,L} where L} where I<:Tuple{Vararg{Union{Base.AbstractCartesianIndex, Int64, Range{Int64}},N} where N} where A<:Union{Base.ReshapedArray{T,N,A,MI} where MI<:Tuple{Vararg{Base.MultiplicativeInverses.SignedMultiplicativeInverse{Int64},N} where N} where A<:Union{DenseArray, SubArray{T,N,P,I,true} where I<:Tuple{Union{Base.Slice, UnitRange},Vararg{Any,N} where N} where P where N where T} where N where T, DenseArray} where N where #s268<:Union{Base.Dates.CompoundPeriod, Base.Dates.Period}</b>) at <a href=\"https://github.com/JuliaLang/julia/tree/d386e40c17d43b79fc89d3e579fc04547241787c/base/dates/periods.jl#L362\" target=\"_blank\">dates/periods.jl:362</a></li> <li> +(x::<b>Base.Dates.TimeType</b>) at <a href=\"https://github.com/JuliaLang/julia/tree/d386e40c17d43b79fc89d3e579fc04547241787c/base/dates/arithmetic.jl#L8\" target=\"_blank\">dates/arithmetic.jl:8</a></li> <li> +(a::<b>Base.Dates.TimeType</b>, b::<b>Base.Dates.Period</b>, c::<b>Base.Dates.Period</b>) at <a href=\"https://github.com/JuliaLang/julia/tree/d386e40c17d43b79fc89d3e579fc04547241787c/base/dates/periods.jl#L378\" target=\"_blank\">dates/periods.jl:378</a></li> <li> +(a::<b>Base.Dates.TimeType</b>, b::<b>Base.Dates.Period</b>, c::<b>Base.Dates.Period</b>, d::<b>Base.Dates.Period...</b>) at <a href=\"https://github.com/JuliaLang/julia/tree/d386e40c17d43b79fc89d3e579fc04547241787c/base/dates/periods.jl#L379\" target=\"_blank\">dates/periods.jl:379</a></li> <li> +(x::<b>Base.Dates.TimeType</b>, y::<b>Base.Dates.CompoundPeriod</b>) at <a href=\"https://github.com/JuliaLang/julia/tree/d386e40c17d43b79fc89d3e579fc04547241787c/base/dates/periods.jl#L382\" target=\"_blank\">dates/periods.jl:382</a></li> <li> +(x::<b>Base.Dates.Instant</b>) at <a href=\"https://github.com/JuliaLang/julia/tree/d386e40c17d43b79fc89d3e579fc04547241787c/base/dates/arithmetic.jl#L4\" target=\"_blank\">dates/arithmetic.jl:4</a></li> <li> +(y::<b>Base.Dates.Period</b>, x::<b>Base.Dates.TimeType</b>) at <a href=\"https://github.com/JuliaLang/julia/tree/d386e40c17d43b79fc89d3e579fc04547241787c/base/dates/arithmetic.jl#L83\" target=\"_blank\">dates/arithmetic.jl:83</a></li> <li> +(x::<b>AbstractArray{#s268,N} where N where #s268<:Base.Dates.TimeType</b>, y::<b>Union{Base.Dates.CompoundPeriod, Base.Dates.Period}</b>) at <a href=\"https://github.com/JuliaLang/julia/tree/d386e40c17d43b79fc89d3e579fc04547241787c/base/dates/arithmetic.jl#L85\" target=\"_blank\">dates/arithmetic.jl:85</a></li> <li> +(x::<b>Base.Dates.Period</b>, r::<b>Range{#s268} where #s268<:Base.Dates.TimeType</b>) at <a href=\"https://github.com/JuliaLang/julia/tree/d386e40c17d43b79fc89d3e579fc04547241787c/base/dates/ranges.jl#L46\" target=\"_blank\">dates/ranges.jl:46</a></li> <li> +(y::<b>Union{Base.Dates.CompoundPeriod, Base.Dates.Period}</b>, x::<b>AbstractArray{#s268,N} where N where #s268<:Base.Dates.TimeType</b>) at <a href=\"https://github.com/JuliaLang/julia/tree/d386e40c17d43b79fc89d3e579fc04547241787c/base/dates/arithmetic.jl#L87\" target=\"_blank\">dates/arithmetic.jl:87</a></li> <li> +(y::<b>Base.Dates.TimeType</b>, x::<b>Union{Base.ReshapedArray{#s268,N,A,MI} where MI<:Tuple{Vararg{Base.MultiplicativeInverses.SignedMultiplicativeInverse{Int64},N} where N} where A<:Union{DenseArray, SubArray{T,N,P,I,true} where I<:Tuple{Union{Base.Slice, UnitRange},Vararg{Any,N} where N} where P where N where T}, DenseArray{#s268,N}, SubArray{#s268,N,A,I,L} where L} where I<:Tuple{Vararg{Union{Base.AbstractCartesianIndex, Int64, Range{Int64}},N} where N} where A<:Union{Base.ReshapedArray{T,N,A,MI} where MI<:Tuple{Vararg{Base.MultiplicativeInverses.SignedMultiplicativeInverse{Int64},N} where N} where A<:Union{DenseArray, SubArray{T,N,P,I,true} where I<:Tuple{Union{Base.Slice, UnitRange},Vararg{Any,N} where N} where P where N where T} where N where T, DenseArray} where N where #s268<:Union{Base.Dates.CompoundPeriod, Base.Dates.Period}</b>) at <a href=\"https://github.com/JuliaLang/julia/tree/d386e40c17d43b79fc89d3e579fc04547241787c/base/dates/arithmetic.jl#L88\" target=\"_blank\">dates/arithmetic.jl:88</a></li> <li> +(J::<b>UniformScaling</b>, x::<b>Number</b>) at <a href=\"https://github.com/JuliaLang/julia/tree/d386e40c17d43b79fc89d3e579fc04547241787c/base/deprecated.jl#L56\" target=\"_blank\">deprecated.jl:56</a></li> <li> +(x::<b>Number</b>, J::<b>UniformScaling</b>) at <a href=\"https://github.com/JuliaLang/julia/tree/d386e40c17d43b79fc89d3e579fc04547241787c/base/deprecated.jl#L56\" target=\"_blank\">deprecated.jl:56</a></li> <li> +(a, b, c, xs...) at <a href=\"https://github.com/JuliaLang/julia/tree/d386e40c17d43b79fc89d3e579fc04547241787c/base/operators.jl#L424\" target=\"_blank\">operators.jl:424</a></li> </ul>"
      ],
      "text/plain": [
       "# 180 methods for generic function \"+\":\n",
       "+(x::Bool, z::Complex{Bool}) in Base at complex.jl:232\n",
       "+(x::Bool, y::Bool) in Base at bool.jl:89\n",
       "+(x::Bool) in Base at bool.jl:86\n",
       "+(x::Bool, y::T) where T<:AbstractFloat in Base at bool.jl:96\n",
       "+(x::Bool, z::Complex) in Base at complex.jl:239\n",
       "+(a::Float16, b::Float16) in Base at float.jl:372\n",
       "+(x::Float32, y::Float32) in Base at float.jl:374\n",
       "+(x::Float64, y::Float64) in Base at float.jl:375\n",
       "+(z::Complex{Bool}, x::Bool) in Base at complex.jl:233\n",
       "+(z::Complex{Bool}, x::Real) in Base at complex.jl:247\n",
       "+(x::Char, y::Integer) in Base at char.jl:40\n",
       "+(c::BigInt, x::BigFloat) in Base.MPFR at mpfr.jl:312\n",
       "+(a::BigInt, b::BigInt, c::BigInt, d::BigInt, e::BigInt) in Base.GMP at gmp.jl:334\n",
       "+(a::BigInt, b::BigInt, c::BigInt, d::BigInt) in Base.GMP at gmp.jl:327\n",
       "+(a::BigInt, b::BigInt, c::BigInt) in Base.GMP at gmp.jl:321\n",
       "+(x::BigInt, y::BigInt) in Base.GMP at gmp.jl:289\n",
       "+(x::BigInt, c::Union{UInt16, UInt32, UInt64, UInt8}) in Base.GMP at gmp.jl:346\n",
       "+(x::BigInt, c::Union{Int16, Int32, Int64, Int8}) in Base.GMP at gmp.jl:362\n",
       "+(a::BigFloat, b::BigFloat, c::BigFloat, d::BigFloat, e::BigFloat) in Base.MPFR at mpfr.jl:460\n",
       "+(a::BigFloat, b::BigFloat, c::BigFloat, d::BigFloat) in Base.MPFR at mpfr.jl:453\n",
       "+(a::BigFloat, b::BigFloat, c::BigFloat) in Base.MPFR at mpfr.jl:447\n",
       "+(x::BigFloat, c::BigInt) in Base.MPFR at mpfr.jl:308\n",
       "+(x::BigFloat, y::BigFloat) in Base.MPFR at mpfr.jl:277\n",
       "+(x::BigFloat, c::Union{UInt16, UInt32, UInt64, UInt8}) in Base.MPFR at mpfr.jl:284\n",
       "+(x::BigFloat, c::Union{Int16, Int32, Int64, Int8}) in Base.MPFR at mpfr.jl:292\n",
       "+(x::BigFloat, c::Union{Float16, Float32, Float64}) in Base.MPFR at mpfr.jl:300\n",
       "+(B::BitArray{2}, J::UniformScaling) in Base.LinAlg at linalg/uniformscaling.jl:59\n",
       "+(a::Base.Pkg.Resolve.VersionWeights.VWPreBuildItem, b::Base.Pkg.Resolve.VersionWeights.VWPreBuildItem) in Base.Pkg.Resolve.VersionWeights at pkg/resolve/versionweight.jl:87\n",
       "+(a::Base.Pkg.Resolve.VersionWeights.VWPreBuild, b::Base.Pkg.Resolve.VersionWeights.VWPreBuild) in Base.Pkg.Resolve.VersionWeights at pkg/resolve/versionweight.jl:135\n",
       "+(a::Base.Pkg.Resolve.VersionWeights.VersionWeight, b::Base.Pkg.Resolve.VersionWeights.VersionWeight) in Base.Pkg.Resolve.VersionWeights at pkg/resolve/versionweight.jl:197\n",
       "+(a::Base.Pkg.Resolve.MaxSum.FieldValues.FieldValue, b::Base.Pkg.Resolve.MaxSum.FieldValues.FieldValue) in Base.Pkg.Resolve.MaxSum.FieldValues at pkg/resolve/fieldvalue.jl:44\n",
       "+(x::Base.Dates.CompoundPeriod, y::Base.Dates.CompoundPeriod) in Base.Dates at dates/periods.jl:349\n",
       "+(x::Base.Dates.CompoundPeriod, y::Base.Dates.Period) in Base.Dates at dates/periods.jl:347\n",
       "+(x::Base.Dates.CompoundPeriod, y::Base.Dates.TimeType) in Base.Dates at dates/periods.jl:387\n",
       "+(x::Date, y::Base.Dates.Day) in Base.Dates at dates/arithmetic.jl:77\n",
       "+(x::Date, y::Base.Dates.Week) in Base.Dates at dates/arithmetic.jl:75\n",
       "+(dt::Date, z::Base.Dates.Month) in Base.Dates at dates/arithmetic.jl:58\n",
       "+(dt::Date, y::Base.Dates.Year) in Base.Dates at dates/arithmetic.jl:32\n",
       "+(dt::Date, t::Base.Dates.Time) in Base.Dates at dates/arithmetic.jl:20\n",
       "+(t::Base.Dates.Time, dt::Date) in Base.Dates at dates/arithmetic.jl:24\n",
       "+(x::Base.Dates.Time, y::Base.Dates.TimePeriod) in Base.Dates at dates/arithmetic.jl:81\n",
       "+(dt::DateTime, z::Base.Dates.Month) in Base.Dates at dates/arithmetic.jl:52\n",
       "+(dt::DateTime, y::Base.Dates.Year) in Base.Dates at dates/arithmetic.jl:28\n",
       "+(x::DateTime, y::Base.Dates.Period) in Base.Dates at dates/arithmetic.jl:79\n",
       "+(y::AbstractFloat, x::Bool) in Base at bool.jl:98\n",
       "+(x::T, y::T) where T<:Union{Int128, Int16, Int32, Int64, Int8, UInt128, UInt16, UInt32, UInt64, UInt8} in Base at int.jl:32\n",
       "+(x::Integer, y::Ptr) in Base at pointer.jl:128\n",
       "+(z::Complex, w::Complex) in Base at complex.jl:221\n",
       "+(z::Complex, x::Bool) in Base at complex.jl:240\n",
       "+(x::Real, z::Complex{Bool}) in Base at complex.jl:246\n",
       "+(x::Real, z::Complex) in Base at complex.jl:258\n",
       "+(z::Complex, x::Real) in Base at complex.jl:259\n",
       "+(x::Rational, y::Rational) in Base at rational.jl:245\n",
       "+(x::Integer, y::Char) in Base at char.jl:41\n",
       "+(i::Integer, index::CartesianIndex) in Base.IteratorsMD at multidimensional.jl:110\n",
       "+(c::Union{UInt16, UInt32, UInt64, UInt8}, x::BigInt) in Base.GMP at gmp.jl:350\n",
       "+(c::Union{Int16, Int32, Int64, Int8}, x::BigInt) in Base.GMP at gmp.jl:363\n",
       "+(c::Union{UInt16, UInt32, UInt64, UInt8}, x::BigFloat) in Base.MPFR at mpfr.jl:288\n",
       "+(c::Union{Int16, Int32, Int64, Int8}, x::BigFloat) in Base.MPFR at mpfr.jl:296\n",
       "+(c::Union{Float16, Float32, Float64}, x::BigFloat) in Base.MPFR at mpfr.jl:304\n",
       "+(x::Irrational, y::Irrational) in Base at irrationals.jl:109\n",
       "+(x::Real, r::Base.Use_StepRangeLen_Instead) in Base at deprecated.jl:1232\n",
       "+(x::Number) in Base at operators.jl:399\n",
       "+(x::T, y::T) where T<:Number in Base at promotion.jl:335\n",
       "+(x::Number, y::Number) in Base at promotion.jl:249\n",
       "+(x::Real, r::AbstractUnitRange) in Base at range.jl:721\n",
       "+(x::Number, r::AbstractUnitRange) in Base at range.jl:723\n",
       "+(x::Number, r::StepRangeLen) in Base at range.jl:726\n",
       "+(x::Number, r::LinSpace) in Base at range.jl:730\n",
       "+(x::Number, r::Range) in Base at range.jl:724\n",
       "+(r::Range, x::Number) in Base at range.jl:732\n",
       "+(r1::OrdinalRange, r2::OrdinalRange) in Base at range.jl:882\n",
       "+(r1::LinSpace{T}, r2::LinSpace{T}) where T in Base at range.jl:889\n",
       "+(r1::StepRangeLen{T,R,S} where S, r2::StepRangeLen{T,R,S} where S) where {R<:Base.TwicePrecision, T} in Base at twiceprecision.jl:300\n",
       "+(r1::StepRangeLen{T,S,S} where S, r2::StepRangeLen{T,S,S} where S) where {T, S} in Base at range.jl:905\n",
       "+(r1::Union{LinSpace, OrdinalRange, StepRangeLen}, r2::Union{LinSpace, OrdinalRange, StepRangeLen}) in Base at range.jl:897\n",
       "+(x::Base.TwicePrecision, y::Number) in Base at twiceprecision.jl:455\n",
       "+(x::Number, y::Base.TwicePrecision) in Base at twiceprecision.jl:458\n",
       "+(x::Base.TwicePrecision{T}, y::Base.TwicePrecision{T}) where T in Base at twiceprecision.jl:461\n",
       "+(x::Base.TwicePrecision, y::Base.TwicePrecision) in Base at twiceprecision.jl:465\n",
       "+(x::Ptr, y::Integer) in Base at pointer.jl:126\n",
       "+(A::BitArray, B::BitArray) in Base at bitarray.jl:1177\n",
       "+(A::SymTridiagonal, B::SymTridiagonal) in Base.LinAlg at linalg/tridiag.jl:128\n",
       "+(A::Tridiagonal, B::Tridiagonal) in Base.LinAlg at linalg/tridiag.jl:624\n",
       "+(A::UpperTriangular, B::UpperTriangular) in Base.LinAlg at linalg/triangular.jl:419\n",
       "+(A::LowerTriangular, B::LowerTriangular) in Base.LinAlg at linalg/triangular.jl:420\n",
       "+(A::UpperTriangular, B::Base.LinAlg.UnitUpperTriangular) in Base.LinAlg at linalg/triangular.jl:421\n",
       "+(A::LowerTriangular, B::Base.LinAlg.UnitLowerTriangular) in Base.LinAlg at linalg/triangular.jl:422\n",
       "+(A::Base.LinAlg.UnitUpperTriangular, B::UpperTriangular) in Base.LinAlg at linalg/triangular.jl:423\n",
       "+(A::Base.LinAlg.UnitLowerTriangular, B::LowerTriangular) in Base.LinAlg at linalg/triangular.jl:424\n",
       "+(A::Base.LinAlg.UnitUpperTriangular, B::Base.LinAlg.UnitUpperTriangular) in Base.LinAlg at linalg/triangular.jl:425\n",
       "+(A::Base.LinAlg.UnitLowerTriangular, B::Base.LinAlg.UnitLowerTriangular) in Base.LinAlg at linalg/triangular.jl:426\n",
       "+(A::Base.LinAlg.AbstractTriangular, B::Base.LinAlg.AbstractTriangular) in Base.LinAlg at linalg/triangular.jl:427\n",
       "+(A::Symmetric, x::Bool) in Base.LinAlg at linalg/symmetric.jl:274\n",
       "+(A::Symmetric, x::Number) in Base.LinAlg at linalg/symmetric.jl:276\n",
       "+(A::Hermitian, x::Bool) in Base.LinAlg at linalg/symmetric.jl:274\n",
       "+(A::Hermitian, x::Real) in Base.LinAlg at linalg/symmetric.jl:276\n",
       "+(Da::Diagonal, Db::Diagonal) in Base.LinAlg at linalg/diagonal.jl:140\n",
       "+(A::Bidiagonal, B::Bidiagonal) in Base.LinAlg at linalg/bidiag.jl:330\n",
       "+(UL::UpperTriangular, J::UniformScaling) in Base.LinAlg at linalg/uniformscaling.jl:72\n",
       "+(UL::Base.LinAlg.UnitUpperTriangular, J::UniformScaling) in Base.LinAlg at linalg/uniformscaling.jl:75\n",
       "+(UL::LowerTriangular, J::UniformScaling) in Base.LinAlg at linalg/uniformscaling.jl:72\n",
       "+(UL::Base.LinAlg.UnitLowerTriangular, J::UniformScaling) in Base.LinAlg at linalg/uniformscaling.jl:75\n",
       "+(A::Array, B::SparseMatrixCSC) in Base.SparseArrays at sparse/sparsematrix.jl:1541\n",
       "+(x::Union{Base.ReshapedArray{T,1,A,MI} where MI<:Tuple{Vararg{Base.MultiplicativeInverses.SignedMultiplicativeInverse{Int64},N} where N} where A<:Union{DenseArray, SubArray{T,N,P,I,true} where I<:Tuple{Union{Base.Slice, UnitRange},Vararg{Any,N} where N} where P where N where T}, DenseArray{T,1}, SubArray{T,1,A,I,L} where L} where I<:Tuple{Vararg{Union{Base.AbstractCartesianIndex, Int64, Range{Int64}},N} where N} where A<:Union{Base.ReshapedArray{T,N,A,MI} where MI<:Tuple{Vararg{Base.MultiplicativeInverses.SignedMultiplicativeInverse{Int64},N} where N} where A<:Union{DenseArray, SubArray{T,N,P,I,true} where I<:Tuple{Union{Base.Slice, UnitRange},Vararg{Any,N} where N} where P where N where T} where N where T, DenseArray} where T, y::AbstractSparseArray{Tv,Ti,1} where Ti where Tv) in Base.SparseArrays at sparse/sparsevector.jl:1340\n",
       "+(x::Union{Base.ReshapedArray{#s268,N,A,MI} where MI<:Tuple{Vararg{Base.MultiplicativeInverses.SignedMultiplicativeInverse{Int64},N} where N} where A<:Union{DenseArray, SubArray{T,N,P,I,true} where I<:Tuple{Union{Base.Slice, UnitRange},Vararg{Any,N} where N} where P where N where T}, DenseArray{#s268,N}, SubArray{#s268,N,A,I,L} where L} where I<:Tuple{Vararg{Union{Base.AbstractCartesianIndex, Int64, Range{Int64}},N} where N} where A<:Union{Base.ReshapedArray{T,N,A,MI} where MI<:Tuple{Vararg{Base.MultiplicativeInverses.SignedMultiplicativeInverse{Int64},N} where N} where A<:Union{DenseArray, SubArray{T,N,P,I,true} where I<:Tuple{Union{Base.Slice, UnitRange},Vararg{Any,N} where N} where P where N where T} where N where T, DenseArray} where N where #s268<:Union{Base.Dates.CompoundPeriod, Base.Dates.Period}) in Base.Dates at dates/periods.jl:358\n",
       "+(A::SparseMatrixCSC, J::UniformScaling) in Base.SparseArrays at sparse/sparsematrix.jl:3608\n",
       "+(A::AbstractArray{TA,2}, J::UniformScaling{TJ}) where {TA, TJ} in Base.LinAlg at linalg/uniformscaling.jl:119\n",
       "+(A::Diagonal, B::Bidiagonal) in Base.LinAlg at linalg/special.jl:113\n",
       "+(A::Bidiagonal, B::Diagonal) in Base.LinAlg at linalg/special.jl:114\n",
       "+(A::Diagonal, B::Tridiagonal) in Base.LinAlg at linalg/special.jl:113\n",
       "+(A::Tridiagonal, B::Diagonal) in Base.LinAlg at linalg/special.jl:114\n",
       "+(A::Diagonal, B::Array{T,2} where T) in Base.LinAlg at linalg/special.jl:113\n",
       "+(A::Array{T,2} where T, B::Diagonal) in Base.LinAlg at linalg/special.jl:114\n",
       "+(A::Bidiagonal, B::Tridiagonal) in Base.LinAlg at linalg/special.jl:113\n",
       "+(A::Tridiagonal, B::Bidiagonal) in Base.LinAlg at linalg/special.jl:114\n",
       "+(A::Bidiagonal, B::Array{T,2} where T) in Base.LinAlg at linalg/special.jl:113\n",
       "+(A::Array{T,2} where T, B::Bidiagonal) in Base.LinAlg at linalg/special.jl:114\n",
       "+(A::Tridiagonal, B::Array{T,2} where T) in Base.LinAlg at linalg/special.jl:113\n",
       "+(A::Array{T,2} where T, B::Tridiagonal) in Base.LinAlg at linalg/special.jl:114\n",
       "+(A::SymTridiagonal, B::Tridiagonal) in Base.LinAlg at linalg/special.jl:122\n",
       "+(A::Tridiagonal, B::SymTridiagonal) in Base.LinAlg at linalg/special.jl:123\n",
       "+(A::SymTridiagonal, B::Array{T,2} where T) in Base.LinAlg at linalg/special.jl:122\n",
       "+(A::Array{T,2} where T, B::SymTridiagonal) in Base.LinAlg at linalg/special.jl:123\n",
       "+(A::Diagonal, B::SymTridiagonal) in Base.LinAlg at linalg/special.jl:131\n",
       "+(A::SymTridiagonal, B::Diagonal) in Base.LinAlg at linalg/special.jl:132\n",
       "+(A::Bidiagonal, B::SymTridiagonal) in Base.LinAlg at linalg/special.jl:131\n",
       "+(A::SymTridiagonal, B::Bidiagonal) in Base.LinAlg at linalg/special.jl:132\n",
       "+(A::Diagonal, B::UpperTriangular) in Base.LinAlg at linalg/special.jl:143\n",
       "+(A::UpperTriangular, B::Diagonal) in Base.LinAlg at linalg/special.jl:144\n",
       "+(A::Diagonal, B::Base.LinAlg.UnitUpperTriangular) in Base.LinAlg at linalg/special.jl:143\n",
       "+(A::Base.LinAlg.UnitUpperTriangular, B::Diagonal) in Base.LinAlg at linalg/special.jl:144\n",
       "+(A::Diagonal, B::LowerTriangular) in Base.LinAlg at linalg/special.jl:143\n",
       "+(A::LowerTriangular, B::Diagonal) in Base.LinAlg at linalg/special.jl:144\n",
       "+(A::Diagonal, B::Base.LinAlg.UnitLowerTriangular) in Base.LinAlg at linalg/special.jl:143\n",
       "+(A::Base.LinAlg.UnitLowerTriangular, B::Diagonal) in Base.LinAlg at linalg/special.jl:144\n",
       "+(A::Base.LinAlg.AbstractTriangular, B::SymTridiagonal) in Base.LinAlg at linalg/special.jl:150\n",
       "+(A::SymTridiagonal, B::Base.LinAlg.AbstractTriangular) in Base.LinAlg at linalg/special.jl:151\n",
       "+(A::Base.LinAlg.AbstractTriangular, B::Tridiagonal) in Base.LinAlg at linalg/special.jl:150\n",
       "+(A::Tridiagonal, B::Base.LinAlg.AbstractTriangular) in Base.LinAlg at linalg/special.jl:151\n",
       "+(A::Base.LinAlg.AbstractTriangular, B::Bidiagonal) in Base.LinAlg at linalg/special.jl:150\n",
       "+(A::Bidiagonal, B::Base.LinAlg.AbstractTriangular) in Base.LinAlg at linalg/special.jl:151\n",
       "+(A::Base.LinAlg.AbstractTriangular, B::Array{T,2} where T) in Base.LinAlg at linalg/special.jl:150\n",
       "+(A::Array{T,2} where T, B::Base.LinAlg.AbstractTriangular) in Base.LinAlg at linalg/special.jl:151\n",
       "+(Y::Union{Base.ReshapedArray{#s267,N,A,MI} where MI<:Tuple{Vararg{Base.MultiplicativeInverses.SignedMultiplicativeInverse{Int64},N} where N} where A<:Union{DenseArray, SubArray{T,N,P,I,true} where I<:Tuple{Union{Base.Slice, UnitRange},Vararg{Any,N} where N} where P where N where T}, DenseArray{#s267,N}, SubArray{#s267,N,A,I,L} where L} where I<:Tuple{Vararg{Union{Base.AbstractCartesianIndex, Int64, Range{Int64}},N} where N} where A<:Union{Base.ReshapedArray{T,N,A,MI} where MI<:Tuple{Vararg{Base.MultiplicativeInverses.SignedMultiplicativeInverse{Int64},N} where N} where A<:Union{DenseArray, SubArray{T,N,P,I,true} where I<:Tuple{Union{Base.Slice, UnitRange},Vararg{Any,N} where N} where P where N where T} where N where T, DenseArray} where N where #s267<:Union{Base.Dates.CompoundPeriod, Base.Dates.Period}, x::Union{Base.Dates.CompoundPeriod, Base.Dates.Period}) in Base.Dates at dates/periods.jl:363\n",
       "+(X::Union{Base.ReshapedArray{#s266,N,A,MI} where MI<:Tuple{Vararg{Base.MultiplicativeInverses.SignedMultiplicativeInverse{Int64},N} where N} where A<:Union{DenseArray, SubArray{T,N,P,I,true} where I<:Tuple{Union{Base.Slice, UnitRange},Vararg{Any,N} where N} where P where N where T}, DenseArray{#s266,N}, SubArray{#s266,N,A,I,L} where L} where I<:Tuple{Vararg{Union{Base.AbstractCartesianIndex, Int64, Range{Int64}},N} where N} where A<:Union{Base.ReshapedArray{T,N,A,MI} where MI<:Tuple{Vararg{Base.MultiplicativeInverses.SignedMultiplicativeInverse{Int64},N} where N} where A<:Union{DenseArray, SubArray{T,N,P,I,true} where I<:Tuple{Union{Base.Slice, UnitRange},Vararg{Any,N} where N} where P where N where T} where N where T, DenseArray} where N where #s266<:Union{Base.Dates.CompoundPeriod, Base.Dates.Period}, Y::Union{Base.ReshapedArray{#s265,N,A,MI} where MI<:Tuple{Vararg{Base.MultiplicativeInverses.SignedMultiplicativeInverse{Int64},N} where N} where A<:Union{DenseArray, SubArray{T,N,P,I,true} where I<:Tuple{Union{Base.Slice, UnitRange},Vararg{Any,N} where N} where P where N where T}, DenseArray{#s265,N}, SubArray{#s265,N,A,I,L} where L} where I<:Tuple{Vararg{Union{Base.AbstractCartesianIndex, Int64, Range{Int64}},N} where N} where A<:Union{Base.ReshapedArray{T,N,A,MI} where MI<:Tuple{Vararg{Base.MultiplicativeInverses.SignedMultiplicativeInverse{Int64},N} where N} where A<:Union{DenseArray, SubArray{T,N,P,I,true} where I<:Tuple{Union{Base.Slice, UnitRange},Vararg{Any,N} where N} where P where N where T} where N where T, DenseArray} where N where #s265<:Union{Base.Dates.CompoundPeriod, Base.Dates.Period}) in Base.Dates at dates/periods.jl:364\n",
       "+(x::Union{Base.ReshapedArray{#s268,N,A,MI} where MI<:Tuple{Vararg{Base.MultiplicativeInverses.SignedMultiplicativeInverse{Int64},N} where N} where A<:Union{DenseArray, SubArray{T,N,P,I,true} where I<:Tuple{Union{Base.Slice, UnitRange},Vararg{Any,N} where N} where P where N where T}, DenseArray{#s268,N}, SubArray{#s268,N,A,I,L} where L} where I<:Tuple{Vararg{Union{Base.AbstractCartesianIndex, Int64, Range{Int64}},N} where N} where A<:Union{Base.ReshapedArray{T,N,A,MI} where MI<:Tuple{Vararg{Base.MultiplicativeInverses.SignedMultiplicativeInverse{Int64},N} where N} where A<:Union{DenseArray, SubArray{T,N,P,I,true} where I<:Tuple{Union{Base.Slice, UnitRange},Vararg{Any,N} where N} where P where N where T} where N where T, DenseArray} where N where #s268<:Union{Base.Dates.CompoundPeriod, Base.Dates.Period}, y::Base.Dates.TimeType) in Base.Dates at dates/arithmetic.jl:86\n",
       "+(r::Range{#s268} where #s268<:Base.Dates.TimeType, x::Base.Dates.Period) in Base.Dates at dates/ranges.jl:47\n",
       "+(A::SparseMatrixCSC, B::SparseMatrixCSC) in Base.SparseArrays at sparse/sparsematrix.jl:1537\n",
       "+(A::SparseMatrixCSC, B::Array) in Base.SparseArrays at sparse/sparsematrix.jl:1540\n",
       "+(x::AbstractSparseArray{Tv,Ti,1} where Ti where Tv, y::AbstractSparseArray{Tv,Ti,1} where Ti where Tv) in Base.SparseArrays at sparse/sparsevector.jl:1339\n",
       "+(x::AbstractSparseArray{Tv,Ti,1} where Ti where Tv, y::Union{Base.ReshapedArray{T,1,A,MI} where MI<:Tuple{Vararg{Base.MultiplicativeInverses.SignedMultiplicativeInverse{Int64},N} where N} where A<:Union{DenseArray, SubArray{T,N,P,I,true} where I<:Tuple{Union{Base.Slice, UnitRange},Vararg{Any,N} where N} where P where N where T}, DenseArray{T,1}, SubArray{T,1,A,I,L} where L} where I<:Tuple{Vararg{Union{Base.AbstractCartesianIndex, Int64, Range{Int64}},N} where N} where A<:Union{Base.ReshapedArray{T,N,A,MI} where MI<:Tuple{Vararg{Base.MultiplicativeInverses.SignedMultiplicativeInverse{Int64},N} where N} where A<:Union{DenseArray, SubArray{T,N,P,I,true} where I<:Tuple{Union{Base.Slice, UnitRange},Vararg{Any,N} where N} where P where N where T} where N where T, DenseArray} where T) in Base.SparseArrays at sparse/sparsevector.jl:1341\n",
       "+(x::AbstractArray{#s45,N} where N where #s45<:Number) in Base at abstractarraymath.jl:95\n",
       "+(A::AbstractArray, B::AbstractArray) in Base at arraymath.jl:38\n",
       "+(A::Number, B::AbstractArray) in Base at arraymath.jl:45\n",
       "+(A::AbstractArray, B::Number) in Base at arraymath.jl:48\n",
       "+(index1::CartesianIndex{N}, index2::CartesianIndex{N}) where N in Base.IteratorsMD at multidimensional.jl:101\n",
       "+(index::CartesianIndex{N}, i::Integer) where N in Base.IteratorsMD at multidimensional.jl:111\n",
       "+(J1::UniformScaling, J2::UniformScaling) in Base.LinAlg at linalg/uniformscaling.jl:58\n",
       "+(J::UniformScaling, B::BitArray{2}) in Base.LinAlg at linalg/uniformscaling.jl:60\n",
       "+(J::UniformScaling, A::AbstractArray{T,2} where T) in Base.LinAlg at linalg/uniformscaling.jl:61\n",
       "+(a::Base.Pkg.Resolve.VersionWeights.HierarchicalValue{T}, b::Base.Pkg.Resolve.VersionWeights.HierarchicalValue{T}) where T in Base.Pkg.Resolve.VersionWeights at pkg/resolve/versionweight.jl:23\n",
       "+(x::P, y::P) where P<:Base.Dates.Period in Base.Dates at dates/periods.jl:70\n",
       "+(x::Base.Dates.Period, y::Base.Dates.Period) in Base.Dates at dates/periods.jl:346\n",
       "+(y::Base.Dates.Period, x::Base.Dates.CompoundPeriod) in Base.Dates at dates/periods.jl:348\n",
       "+(x::Union{Base.Dates.CompoundPeriod, Base.Dates.Period}) in Base.Dates at dates/periods.jl:357\n",
       "+(x::Union{Base.Dates.CompoundPeriod, Base.Dates.Period}, Y::Union{Base.ReshapedArray{#s268,N,A,MI} where MI<:Tuple{Vararg{Base.MultiplicativeInverses.SignedMultiplicativeInverse{Int64},N} where N} where A<:Union{DenseArray, SubArray{T,N,P,I,true} where I<:Tuple{Union{Base.Slice, UnitRange},Vararg{Any,N} where N} where P where N where T}, DenseArray{#s268,N}, SubArray{#s268,N,A,I,L} where L} where I<:Tuple{Vararg{Union{Base.AbstractCartesianIndex, Int64, Range{Int64}},N} where N} where A<:Union{Base.ReshapedArray{T,N,A,MI} where MI<:Tuple{Vararg{Base.MultiplicativeInverses.SignedMultiplicativeInverse{Int64},N} where N} where A<:Union{DenseArray, SubArray{T,N,P,I,true} where I<:Tuple{Union{Base.Slice, UnitRange},Vararg{Any,N} where N} where P where N where T} where N where T, DenseArray} where N where #s268<:Union{Base.Dates.CompoundPeriod, Base.Dates.Period}) in Base.Dates at dates/periods.jl:362\n",
       "+(x::Base.Dates.TimeType) in Base.Dates at dates/arithmetic.jl:8\n",
       "+(a::Base.Dates.TimeType, b::Base.Dates.Period, c::Base.Dates.Period) in Base.Dates at dates/periods.jl:378\n",
       "+(a::Base.Dates.TimeType, b::Base.Dates.Period, c::Base.Dates.Period, d::Base.Dates.Period...) in Base.Dates at dates/periods.jl:379\n",
       "+(x::Base.Dates.TimeType, y::Base.Dates.CompoundPeriod) in Base.Dates at dates/periods.jl:382\n",
       "+(x::Base.Dates.Instant) in Base.Dates at dates/arithmetic.jl:4\n",
       "+(y::Base.Dates.Period, x::Base.Dates.TimeType) in Base.Dates at dates/arithmetic.jl:83\n",
       "+(x::AbstractArray{#s268,N} where N where #s268<:Base.Dates.TimeType, y::Union{Base.Dates.CompoundPeriod, Base.Dates.Period}) in Base.Dates at dates/arithmetic.jl:85\n",
       "+(x::Base.Dates.Period, r::Range{#s268} where #s268<:Base.Dates.TimeType) in Base.Dates at dates/ranges.jl:46\n",
       "+(y::Union{Base.Dates.CompoundPeriod, Base.Dates.Period}, x::AbstractArray{#s268,N} where N where #s268<:Base.Dates.TimeType) in Base.Dates at dates/arithmetic.jl:87\n",
       "+(y::Base.Dates.TimeType, x::Union{Base.ReshapedArray{#s268,N,A,MI} where MI<:Tuple{Vararg{Base.MultiplicativeInverses.SignedMultiplicativeInverse{Int64},N} where N} where A<:Union{DenseArray, SubArray{T,N,P,I,true} where I<:Tuple{Union{Base.Slice, UnitRange},Vararg{Any,N} where N} where P where N where T}, DenseArray{#s268,N}, SubArray{#s268,N,A,I,L} where L} where I<:Tuple{Vararg{Union{Base.AbstractCartesianIndex, Int64, Range{Int64}},N} where N} where A<:Union{Base.ReshapedArray{T,N,A,MI} where MI<:Tuple{Vararg{Base.MultiplicativeInverses.SignedMultiplicativeInverse{Int64},N} where N} where A<:Union{DenseArray, SubArray{T,N,P,I,true} where I<:Tuple{Union{Base.Slice, UnitRange},Vararg{Any,N} where N} where P where N where T} where N where T, DenseArray} where N where #s268<:Union{Base.Dates.CompoundPeriod, Base.Dates.Period}) in Base.Dates at dates/arithmetic.jl:88\n",
       "+(J::UniformScaling, x::Number) in Base at deprecated.jl:56\n",
       "+(x::Number, J::UniformScaling) in Base at deprecated.jl:56\n",
       "+(a, b, c, xs...) in Base at operators.jl:424"
      ]
     },
     "execution_count": 5,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "methods(+)"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "We're just going to add a few new methods for `+` to deal with `Dual`s: "
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 6,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "+ (generic function with 183 methods)"
      ]
     },
     "execution_count": 6,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "+(n::Number, d::Dual)   = Dual(d.value + n,         d.derivative)\n",
    "+(d::Dual,   n::Number) = Dual(d.value + n,         d.derivative)\n",
    "+(d1::Dual,  d2::Dual)  = Dual(d1.value + d2.value, d1.derivative + d2.derivative)"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "Note that `Number` is an abstract type, representing an entire family of types. By defining `+` for `Dual` and `Number`, we get the right behavior for any subtype of `Number`, like `Int`, `Float64`, `UInt8`, `BigInt`, etc."
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "Now we can add Duals, and they will propagate their derivative information: "
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 7,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "Dual{Float64}(6.0, 1.0)"
      ]
     },
     "execution_count": 7,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "d1 = Dual(1.0, 1.0)\n",
    "\n",
    "d1 + 5"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 8,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "Dual{Float64}(2.0, 1.5)"
      ]
     },
     "execution_count": 8,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "d2 = Dual(1.0, 0.5)\n",
    "d1 + d2"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "Let's implement multiplication using the product rule from basic calculus: "
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 9,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "* (generic function with 185 methods)"
      ]
     },
     "execution_count": 9,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "import Base: *\n",
    "*(n::Number, d::Dual)   = Dual(n * d.value,         d.derivative * n)\n",
    "*(d::Dual,   n::Number) = Dual(n * d.value,         d.derivative * n)\n",
    "*(d1::Dual,  d2::Dual)  = Dual(d1.value * d2.value, d1.value * d2.derivative + d2.value * d1.derivative)"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "### Aside: Why Julia is Different\n",
    "\n",
    "We can do this kind of operator overloading in many languages. But the cool part about Julia is that there's nothing special about `+` or other operators. We can overload any function we want for any combination of types. Let's implement a few more functions for our `Dual` type:"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 10,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "cos (generic function with 11 methods)"
      ]
     },
     "execution_count": 10,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "import Base: sin, cos\n",
    "\n",
    "sin(d::Dual) = Dual(sin(d.value),  cos(d.value) * d.derivative)\n",
    "cos(d::Dual) = Dual(cos(d.value), -sin(d.value) * d.derivative)"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "### Back to Autodiff\n",
    "\n",
    "Now we can use this `Dual` number to perform automatic differentiation! First, we need a function to differentiate:"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 11,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "f (generic function with 1 method)"
      ]
     },
     "execution_count": 11,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "f(x) = sin(3x + 5)"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "To evaluate the derivative of `f` at `x`, we first create a Dual with value `x` and derivative $\\frac{d x}{d x} = 1$"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 12,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "Dual{Float64}(0.7853981633974483, 1.0)"
      ]
     },
     "execution_count": 12,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "x = π / 4\n",
    "x_dual = Dual(x, 1.0)"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "Now we just pass our `Dual` through the function and check the `derivative` field of the result:"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 13,
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "The derivative of f at 0.7853981633974483 is 1.4324472070543601\n"
     ]
    }
   ],
   "source": [
    "y = f(x_dual)\n",
    "df = y.derivative\n",
    "println(\"The derivative of f at $x is $df\")"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "We can compare that against numerical differentiation: "
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 14,
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "The derivative of f at 0.7853981633974483 is approximately 1.4324471608873068\n"
     ]
    }
   ],
   "source": [
    "δx = 1e-8\n",
    "estimate = (f(x + δx) - f(x)) / (δx)\n",
    "println(\"The derivative of f at $x is approximately $estimate\")"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "Success! We got an exact measurement (up to machine accuracy) of the derivative of `f` without any numerical differentation. The best part is that in Julia, this kind of work is extremely efficient: "
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 15,
   "metadata": {},
   "outputs": [],
   "source": [
    "using BenchmarkTools"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 16,
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "  15.644 ns (0 allocations: 0 bytes)\n"
     ]
    },
    {
     "data": {
      "text/plain": [
       "0.87864131216594"
      ]
     },
     "execution_count": 16,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "@btime f($x)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 17,
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "  32.854 ns (0 allocations: 0 bytes)\n"
     ]
    },
    {
     "data": {
      "text/plain": [
       "Dual{Float64}(0.87864131216594, 1.4324472070543601)"
      ]
     },
     "execution_count": 17,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "@btime f($x_dual)"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "There's no overhead introduced by our Dual type: computing `f` *and its derivative* takes only twice as long as computing the value of `f`. "
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "## More operations\n",
    "\n",
    "Multiple dispatch is the basis for much of Julia's power and flexibility. We can define new interesting types, give them behaviors, and then use those behaviors to do more complex things. As a very basic demonstration, now that we've defined multiplication and addition for our Dual type, we get sums and exponentiation for free:"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 18,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "Dual{Float64}(2.25, 3.0)"
      ]
     },
     "execution_count": 18,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "d = Dual(0.5, 1.0)\n",
    "(d + 1)^2"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 19,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "Dual{Float64}(1.75, 4.0)"
      ]
     },
     "execution_count": 19,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "sum([d, 2 * d, d^2])"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "# Completing the Implementation\n",
    "\n",
    "To make a real autodiff library, we just need to automate the process of creating a new Dual, passing it through a function, and extracting its derivative. Functions in Julia are first-class, so it's easy to create a function that operates on other functions:"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 20,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "derivative (generic function with 1 method)"
      ]
     },
     "execution_count": 20,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "function derivative(f, x)\n",
    "    x_dual = Dual(x, one(x))  # one(x) gives the unit value of whatever x's type is. So, for an integer x, one(x) == 1\n",
    "    y_dual = f(x_dual)\n",
    "    y_dual.derivative\n",
    "end"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 21,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "1.4324472070543601"
      ]
     },
     "execution_count": 21,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "derivative(f, π/4)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 22,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "4.0"
      ]
     },
     "execution_count": 22,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "f2(x) = x^2\n",
    "derivative(f2, 2.0)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 23,
   "metadata": {},
   "outputs": [],
   "source": [
    "# Check against the analytical derivative\n",
    "@assert derivative(f2, 2.0) ≈ 2 * 2.0"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 24,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "-5.49086169407354"
      ]
     },
     "execution_count": 24,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "f3(x) = 3x + sin(x^2 * 10) + cos(x)\n",
    "derivative(f3, 0.5)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 25,
   "metadata": {},
   "outputs": [],
   "source": [
    "# Check against the analytical derivative\n",
    "@assert derivative(f3, 0.5) ≈ 3 + cos(0.5^2 * 10) * (10 * 2 * 0.5) - sin(0.5)"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "To get even more fancy, we can make `derivative(f)` return a *new function* `df` which evaluates the derivative of `f`:"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 26,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "derivative (generic function with 2 methods)"
      ]
     },
     "execution_count": 26,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "derivative(f) = x -> derivative(f, x)  # the -> syntax creates an anonymous function"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 27,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "(::#3) (generic function with 1 method)"
      ]
     },
     "execution_count": 27,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "df = derivative(f)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 28,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "1.4324472070543601"
      ]
     },
     "execution_count": 28,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "df(π/4)"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "And despite the use of functions-as-data and anonymous functions, we still haven't lost any performance! Using `df()` is just as fast as our original `f(x_dual)`: "
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 29,
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "  30.649 ns (0 allocations: 0 bytes)\n"
     ]
    },
    {
     "data": {
      "text/plain": [
       "1.4324472070543601"
      ]
     },
     "execution_count": 29,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "@btime $df($x)"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "## Conclusion\n",
    "\n",
    "With relatively few method implementations, multiple dispatch lets us build an entire library for differentiating complex functions efficiently. "
   ]
  }
 ],
 "metadata": {
  "kernelspec": {
   "display_name": "Julia 0.6.2",
   "language": "julia",
   "name": "julia-0.6"
  },
  "language_info": {
   "file_extension": ".jl",
   "mimetype": "application/julia",
   "name": "julia",
   "version": "0.6.2"
  }
 },
 "nbformat": 4,
 "nbformat_minor": 1
}
